Skip to content

Commit 0b804cd

Browse files
authored
Update main.go
improve the speed of Go code
1 parent 47806fd commit 0b804cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

words_extractor_go/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ func without_channels() {
4040
paths, _ := doublestar.Glob("../data/**/*.yml")
4141

4242
items_count := len(paths)
43-
43+
wg.Add(items_count)
4444
for _, path := range paths {
45-
wg.Add(1)
4645
go processFile(&wg, outdir, path, false)
4746
}
4847
wg.Wait()

0 commit comments

Comments
 (0)