From b1e8ca700e943e4bcf4073baa14eaf7c860bc16c Mon Sep 17 00:00:00 2001 From: Florian Pfitzer Date: Wed, 16 Nov 2022 10:58:32 +0100 Subject: [PATCH] expose runner cancel func --- runner/runner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runner/runner.go b/runner/runner.go index d4c88a5..c3f9db3 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -65,6 +65,11 @@ func (r *Runner) Wait() { r.wg.Wait() } +// Cancel fetching from providers +func (r *Runner) Cancel() { + r.cancelFunc() +} + // worker checks to see if the context is finished and executes the fetching process for each provider func (r *Runner) worker(ctx context.Context, domains chan string, results chan string) { work: