mirror of https://github.com/docker/cli.git
cli/command/context: Using the variable on range scope `c` in function literal (scopelint)
``` cli/command/context/create_test.go:270:31: Using the variable on range scope `c` in function literal (scopelint) Name: c.name, ^ cli/command/context/create_test.go:271:31: Using the variable on range scope `c` in function literal (scopelint) Description: c.description, ^ cli/command/context/create_test.go:272:31: Using the variable on range scope `c` in function literal (scopelint) DefaultStackOrchestrator: c.orchestrator, cli/command/context/create_test.go:346:31: Using the variable on range scope `c` in function literal (scopelint) Name: c.name, ^ cli/command/context/create_test.go:347:31: Using the variable on range scope `c` in function literal (scopelint) Description: c.description, ^ cli/command/context/create_test.go:348:31: Using the variable on range scope `c` in function literal (scopelint) DefaultStackOrchestrator: c.orchestrator, ^ ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1736662bea
commit
a269e17d72
|
@ -263,6 +263,7 @@ func TestCreateFromContext(t *testing.T) {
|
||||||
cli.SetCurrentContext("dummy")
|
cli.SetCurrentContext("dummy")
|
||||||
|
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
|
c := c
|
||||||
t.Run(c.name, func(t *testing.T) {
|
t.Run(c.name, func(t *testing.T) {
|
||||||
cli.ResetOutputBuffers()
|
cli.ResetOutputBuffers()
|
||||||
err := RunCreate(cli, &CreateOptions{
|
err := RunCreate(cli, &CreateOptions{
|
||||||
|
@ -339,6 +340,7 @@ func TestCreateFromCurrent(t *testing.T) {
|
||||||
cli.SetCurrentContext("original")
|
cli.SetCurrentContext("original")
|
||||||
|
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
|
c := c
|
||||||
t.Run(c.name, func(t *testing.T) {
|
t.Run(c.name, func(t *testing.T) {
|
||||||
cli.ResetOutputBuffers()
|
cli.ResetOutputBuffers()
|
||||||
err := RunCreate(cli, &CreateOptions{
|
err := RunCreate(cli, &CreateOptions{
|
||||||
|
|
Loading…
Reference in New Issue