mirror of https://github.com/docker/cli.git
cli/compose/loader: remove redundant capturing of loop vars (copyloopvar)
go1.22 and up now produce a unique variable in loops, tehrefore no longer requiring to capture the variable manually; cli/compose/loader/merge.go:71:3: The copy of the 'for' variable "overrideService" can be deleted (Go 1.22+) (copyloopvar) overrideService := overrideService ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
78a7e15032
commit
40833fd296
|
@ -68,7 +68,6 @@ func mergeServices(base, override []types.ServiceConfig) ([]types.ServiceConfig,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for name, overrideService := range overrideServices {
|
for name, overrideService := range overrideServices {
|
||||||
overrideService := overrideService
|
|
||||||
if baseService, ok := baseServices[name]; ok {
|
if baseService, ok := baseServices[name]; ok {
|
||||||
if err := mergo.Merge(&baseService, &overrideService, mergo.WithAppendSlice, mergo.WithOverride, mergo.WithTransformers(specials)); err != nil {
|
if err := mergo.Merge(&baseService, &overrideService, mergo.WithAppendSlice, mergo.WithOverride, mergo.WithTransformers(specials)); err != nil {
|
||||||
return base, errors.Wrapf(err, "cannot merge service %s", name)
|
return base, errors.Wrapf(err, "cannot merge service %s", name)
|
||||||
|
|
Loading…
Reference in New Issue