Merge pull request #154 from tiborvass/fix-149

build: fix scoping issue in closure inside loop
pull/155/head
Tõnis Tiigi 5 years ago committed by GitHub
commit 96fb17b711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -541,7 +541,7 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
multiTarget := len(opt) > 1 multiTarget := len(opt) > 1
for k, opt := range opt { for k, opt := range opt {
err := func() error { err := func(k string) error {
opt := opt opt := opt
dps := m[k] dps := m[k]
multiDriver := len(m[k]) > 1 multiDriver := len(m[k]) > 1
@ -685,7 +685,7 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
} }
return nil return nil
}() }(k)
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save