mirror of https://github.com/docker/cli.git
cli/command/stack/kubernetes: Using a reference for the variable on range scope `obj` (scopelint)
``` cli/command/stack/kubernetes/watcher_test.go:44:20: Using a reference for the variable on range scope `obj` (scopelint) if err := o.Add(&obj); err != nil { ^ cli/command/stack/kubernetes/watcher_test.go:49:20: Using a reference for the variable on range scope `obj` (scopelint) if err := o.Add(&obj); err != nil { ^ ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c2b069f4db
commit
754fc6fe67
|
@ -41,11 +41,13 @@ func newTestPodAndStackRepository(initialPods []apiv1.Pod, initialStacks []apiv1
|
|||
|
||||
o := k8stesting.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
for _, obj := range initialPods {
|
||||
obj := obj
|
||||
if err := o.Add(&obj); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
for _, obj := range initialStacks {
|
||||
obj := obj
|
||||
if err := o.Add(&obj); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue