Skip to content

Commit

Permalink
cli/command/stack/kubernetes: Using a reference for the variable on r…
Browse files Browse the repository at this point in the history
…ange 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 <[email protected]>
  • Loading branch information
thaJeztah committed Oct 31, 2019
1 parent c2b069f commit 754fc6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/command/stack/kubernetes/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 754fc6f

Please sign in to comment.