We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c48f174 commit 3d9d127Copy full SHA for 3d9d127
main.go
@@ -419,15 +419,19 @@ func main() {
419
}
420
421
422
+ var outputWG sync.WaitGroup
423
+ dedupnames := make(map[string]struct{})
424
+ outputWG.Add(1)
425
+
426
go func() {
- dedupnames := make(map[string]struct{})
427
for username := range outputqueue {
428
lcasename := strings.ToLower(username)
429
if _, found := dedupnames[lcasename]; !found {
430
fmt.Fprintln(output, username)
431
dedupnames[lcasename] = struct{}{}
432
433
434
+ outputWG.Done()
435
}()
436
437
var pb *progressbar.ProgressBar
@@ -459,4 +463,5 @@ func main() {
459
463
460
464
jobs.Wait()
461
465
close(outputqueue)
466
+ outputWG.Wait()
462
467
0 commit comments