Skip to content

Commit a7a7f64

Browse files
committed
Deduplicate found usernames so they're case insensitive
1 parent 8ccc061 commit a7a7f64

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,13 @@ func main() {
420420
}
421421

422422
go func() {
423+
dedupnames := make(map[string]struct{})
423424
for username := range outputqueue {
424-
fmt.Fprintln(output, username)
425+
lcasename := strings.ToLower(username)
426+
if _, found := dedupnames[lcasename]; !found {
427+
fmt.Fprintln(output, username)
428+
dedupnames[lcasename] = struct{}{}
429+
}
425430
}
426431
}()
427432

0 commit comments

Comments
 (0)