From a2b841b4017d8effe54105ec02c8de0ba32c0006 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Fri, 10 May 2024 10:10:21 -0600 Subject: [PATCH] Changed flag name from threads to concurrency --- internal/collect.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/collect.go b/internal/collect.go index 9eff14f..4f0dca3 100644 --- a/internal/collect.go +++ b/internal/collect.go @@ -39,7 +39,7 @@ type QueryParams struct { User string Pass string Drivers []string - Threads int + Concurrency int Preferred string Timeout int CaCertPath string @@ -71,14 +71,14 @@ func CollectAll(probeStates *[]ScannedResult, l *log.Logger, q *QueryParams) err offset = 0 wg sync.WaitGroup found = make([]string, 0, len(*probeStates)) - done = make(chan struct{}, q.Threads+1) - chanProbeState = make(chan ScannedResult, q.Threads+1) + done = make(chan struct{}, q.Concurrency+1) + chanProbeState = make(chan ScannedResult, q.Concurrency+1) client = smd.NewClient( smd.WithSecureTLS(q.CaCertPath), ) ) - wg.Add(q.Threads) - for i := 0; i < q.Threads; i++ { + wg.Add(q.Concurrency) + for i := 0; i < q.Concurrency; i++ { go func() { for { ps, ok := <-chanProbeState