diff --git a/cli/command/config/inspect_test.go b/cli/command/config/inspect_test.go index 1b4f275ccb..d174b0c502 100644 --- a/cli/command/config/inspect_test.go +++ b/cli/command/config/inspect_test.go @@ -7,10 +7,9 @@ import ( "time" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/config/ls_test.go b/cli/command/config/ls_test.go index d3055b4aa1..4677b068e7 100644 --- a/cli/command/config/ls_test.go +++ b/cli/command/config/ls_test.go @@ -7,11 +7,10 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" is "gotest.tools/assert/cmp" "gotest.tools/golden" diff --git a/cli/command/container/list_test.go b/cli/command/container/list_test.go index 2bc1949a7f..310d78020a 100644 --- a/cli/command/container/list_test.go +++ b/cli/command/container/list_test.go @@ -7,9 +7,8 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/idresolver/idresolver_test.go b/cli/command/idresolver/idresolver_test.go index f667b10641..4cb6355594 100644 --- a/cli/command/idresolver/idresolver_test.go +++ b/cli/command/idresolver/idresolver_test.go @@ -1,16 +1,14 @@ package idresolver import ( + "context" "testing" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types/swarm" + "github.com/pkg/errors" "gotest.tools/assert" is "gotest.tools/assert/cmp" - // Import builders to get the builder function as package function - "context" - - . "github.com/docker/cli/internal/test/builders" - "github.com/pkg/errors" ) func TestResolveError(t *testing.T) { diff --git a/cli/command/node/demote_test.go b/cli/command/node/demote_test.go index 3f18d63d41..849cbdc93d 100644 --- a/cli/command/node/demote_test.go +++ b/cli/command/node/demote_test.go @@ -5,11 +5,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package functions "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "gotest.tools/assert" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" ) func TestNodeDemoteErrors(t *testing.T) { diff --git a/cli/command/node/inspect_test.go b/cli/command/node/inspect_test.go index de343b0f49..22be4f475f 100644 --- a/cli/command/node/inspect_test.go +++ b/cli/command/node/inspect_test.go @@ -6,11 +6,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package functions "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/node/list_test.go b/cli/command/node/list_test.go index 5dc11c961a..11e5ff3f60 100644 --- a/cli/command/node/list_test.go +++ b/cli/command/node/list_test.go @@ -6,14 +6,13 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "gotest.tools/assert" is "gotest.tools/assert/cmp" "gotest.tools/golden" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" ) func TestNodeListErrorOnAPIFailure(t *testing.T) { diff --git a/cli/command/node/promote_test.go b/cli/command/node/promote_test.go index c6b5342320..528180ae00 100644 --- a/cli/command/node/promote_test.go +++ b/cli/command/node/promote_test.go @@ -5,11 +5,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "gotest.tools/assert" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" ) func TestNodePromoteErrors(t *testing.T) { diff --git a/cli/command/node/ps_test.go b/cli/command/node/ps_test.go index 74a1779b1f..da4637da61 100644 --- a/cli/command/node/ps_test.go +++ b/cli/command/node/ps_test.go @@ -8,11 +8,10 @@ import ( "time" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/node/update_test.go b/cli/command/node/update_test.go index 8b6ae807da..00c447b6b2 100644 --- a/cli/command/node/update_test.go +++ b/cli/command/node/update_test.go @@ -5,11 +5,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "gotest.tools/assert" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" ) func TestNodeUpdateErrors(t *testing.T) { diff --git a/cli/command/secret/inspect_test.go b/cli/command/secret/inspect_test.go index 67addaeadf..9224f9b796 100644 --- a/cli/command/secret/inspect_test.go +++ b/cli/command/secret/inspect_test.go @@ -7,10 +7,9 @@ import ( "time" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/secret/ls_test.go b/cli/command/secret/ls_test.go index e1417115ce..1e6af25a0d 100644 --- a/cli/command/secret/ls_test.go +++ b/cli/command/secret/ls_test.go @@ -7,11 +7,10 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" is "gotest.tools/assert/cmp" "gotest.tools/golden" diff --git a/cli/command/service/client_test.go b/cli/command/service/client_test.go index b6b9f99058..a64c81ad91 100644 --- a/cli/command/service/client_test.go +++ b/cli/command/service/client_test.go @@ -3,12 +3,10 @@ package service import ( "context" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" ) type fakeClient struct { diff --git a/cli/command/stack/list_test.go b/cli/command/stack/list_test.go index 5fdc04bed3..8d792172ac 100644 --- a/cli/command/stack/list_test.go +++ b/cli/command/stack/list_test.go @@ -6,8 +6,7 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/cli/internal/test" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" diff --git a/cli/command/stack/ps_test.go b/cli/command/stack/ps_test.go index a3e68656fb..8e49d193bd 100644 --- a/cli/command/stack/ps_test.go +++ b/cli/command/stack/ps_test.go @@ -7,8 +7,7 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" diff --git a/cli/command/stack/services_test.go b/cli/command/stack/services_test.go index a54e967983..52ba712780 100644 --- a/cli/command/stack/services_test.go +++ b/cli/command/stack/services_test.go @@ -6,9 +6,7 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" - - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" diff --git a/cli/command/swarm/join_token_test.go b/cli/command/swarm/join_token_test.go index 1bd7ba2508..e34e7da5f0 100644 --- a/cli/command/swarm/join_token_test.go +++ b/cli/command/swarm/join_token_test.go @@ -6,11 +6,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/swarm/unlock_key_test.go b/cli/command/swarm/unlock_key_test.go index d28921a141..d313c6319f 100644 --- a/cli/command/swarm/unlock_key_test.go +++ b/cli/command/swarm/unlock_key_test.go @@ -6,11 +6,10 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/swarm/update_test.go b/cli/command/swarm/update_test.go index 20a5624a89..ebddeeec0d 100644 --- a/cli/command/swarm/update_test.go +++ b/cli/command/swarm/update_test.go @@ -7,12 +7,10 @@ import ( "time" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/task/print_test.go b/cli/command/task/print_test.go index 6fa6e58653..5b5c0a81c3 100644 --- a/cli/command/task/print_test.go +++ b/cli/command/task/print_test.go @@ -8,8 +8,7 @@ import ( "github.com/docker/cli/cli/command/formatter" "github.com/docker/cli/cli/command/idresolver" "github.com/docker/cli/internal/test" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "gotest.tools/assert" diff --git a/cli/command/volume/inspect_test.go b/cli/command/volume/inspect_test.go index 759042a512..c5baa9c62e 100644 --- a/cli/command/volume/inspect_test.go +++ b/cli/command/volume/inspect_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/cli/command/volume/list_test.go b/cli/command/volume/list_test.go index 9159eb89ef..9f07006f16 100644 --- a/cli/command/volume/list_test.go +++ b/cli/command/volume/list_test.go @@ -6,12 +6,11 @@ import ( "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/internal/test" + . "github.com/docker/cli/internal/test/builders" // Import builders to get the builder function as package function "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" volumetypes "github.com/docker/docker/api/types/volume" "github.com/pkg/errors" - // Import builders to get the builder function as package function - . "github.com/docker/cli/internal/test/builders" "gotest.tools/assert" "gotest.tools/golden" ) diff --git a/internal/containerizedengine/update.go b/internal/containerizedengine/update.go index 3cd7b31082..7c71da19e4 100644 --- a/internal/containerizedengine/update.go +++ b/internal/containerizedengine/update.go @@ -16,7 +16,7 @@ import ( "github.com/docker/distribution/reference" "github.com/docker/docker/api/types" ver "github.com/hashicorp/go-version" - "github.com/opencontainers/image-spec/specs-go/v1" + v1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" )