chore: use wg.Go instead of add

This commit is contained in:
Florian Schade
2026-04-22 14:50:57 +02:00
committed by Ralf Haferkamp
parent a8fff7e4c3
commit 86d79430a3
7 changed files with 18 additions and 36 deletions
+2 -4
View File
@@ -227,13 +227,11 @@ func listFolder(path string, ch chan<- string, workers chan struct{}) error {
for _, child := range children {
if child.IsDir() {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
if err := listFolder(filepath.Join(path, child.Name()), ch, workers); err != nil {
fmt.Println("error listing", path, err)
}
}()
})
}
if _versionRegex.MatchString(child.Name()) {