From 73dad4356e89593827d7d8547243c2fa30d97343 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:16:54 +0100 Subject: [PATCH] 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 (cherry picked from commit 754fc6fe677773cce9c31c4d77449a4227b35552) Signed-off-by: Sebastiaan van Stijn --- cli/command/stack/kubernetes/watcher_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/command/stack/kubernetes/watcher_test.go b/cli/command/stack/kubernetes/watcher_test.go index 0972a91461..c02655e8aa 100644 --- a/cli/command/stack/kubernetes/watcher_test.go +++ b/cli/command/stack/kubernetes/watcher_test.go @@ -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) }