Skip to content

Commit

Permalink
fix for loop scoping. fixes #69, #70
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Jul 9, 2024
1 parent f148a53 commit 615551d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/depsyncer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func main() {
var wg sync.WaitGroup

for _, name := range flag.Args()[0:] {
// we're attaching this to a callback which is called from
// a goroutine. so we need to re-initialize the variable scope.
name := name

// create the assigner
assignerOpts := []depsync.AssignerOption{
Expand Down

0 comments on commit 615551d

Please sign in to comment.