Skip to content

Commit

Permalink
fix: loop variable url captured by func literal (govet)
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeine-addictt committed Apr 7, 2024
1 parent 86d0b76 commit 56fbd87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ var getCommand = &cobra.Command{
waitGroup.Add(len(argSet))

for url := range argSet {
go func() {
go func(url string) {
defer waitGroup.Done()
downloadFile(url)
}()
}(url)
}

waitGroup.Wait()
Expand Down

0 comments on commit 56fbd87

Please sign in to comment.