From 986ec3f87719eb163b2627c25c08993496c7b534 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 30 May 2025 12:29:41 +0200 Subject: [PATCH] daemon/cluster: remove // import comments These comments were added to enforce using the correct import path for our packages ("github.com/docker/docker", not "github.com/moby/moby"). However, when working in go module mode (not GOPATH / vendor), they have no effect, so their impact is limited. Remove these imports in preparation of migrating our code to become an actual go module. Signed-off-by: Sebastiaan van Stijn --- daemon/cluster/cluster.go | 2 +- daemon/cluster/configs.go | 2 +- daemon/cluster/controllers/plugin/controller.go | 2 +- daemon/cluster/controllers/plugin/controller_test.go | 2 +- daemon/cluster/convert/config.go | 2 +- daemon/cluster/convert/container.go | 2 +- daemon/cluster/convert/container_test.go | 2 +- daemon/cluster/convert/network.go | 2 +- daemon/cluster/convert/network_test.go | 2 +- daemon/cluster/convert/node.go | 2 +- daemon/cluster/convert/secret.go | 2 +- daemon/cluster/convert/service.go | 2 +- daemon/cluster/convert/service_test.go | 2 +- daemon/cluster/convert/swarm.go | 2 +- daemon/cluster/convert/task.go | 2 +- daemon/cluster/convert/volume.go | 2 +- daemon/cluster/errors.go | 2 +- daemon/cluster/executor/backend.go | 2 +- daemon/cluster/executor/container/adapter.go | 2 +- daemon/cluster/executor/container/adapter_test.go | 2 +- daemon/cluster/executor/container/attachment.go | 2 +- daemon/cluster/executor/container/container.go | 2 +- daemon/cluster/executor/container/container_test.go | 2 +- daemon/cluster/executor/container/controller.go | 2 +- daemon/cluster/executor/container/errors.go | 2 +- daemon/cluster/executor/container/executor.go | 2 +- daemon/cluster/executor/container/health_test.go | 2 +- daemon/cluster/executor/container/validate.go | 2 +- daemon/cluster/executor/container/validate_test.go | 2 +- daemon/cluster/executor/container/validate_unix_test.go | 2 +- daemon/cluster/executor/container/validate_windows_test.go | 2 +- daemon/cluster/filters.go | 2 +- daemon/cluster/filters_test.go | 2 +- daemon/cluster/helpers.go | 2 +- daemon/cluster/listen_addr.go | 2 +- daemon/cluster/listen_addr_linux.go | 2 +- daemon/cluster/listen_addr_others.go | 2 +- daemon/cluster/networks.go | 2 +- daemon/cluster/noderunner.go | 2 +- daemon/cluster/nodes.go | 2 +- daemon/cluster/provider/network.go | 2 +- daemon/cluster/secrets.go | 2 +- daemon/cluster/services.go | 2 +- daemon/cluster/swarm.go | 2 +- daemon/cluster/tasks.go | 2 +- daemon/cluster/utils.go | 2 +- daemon/cluster/volumes.go | 2 +- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/daemon/cluster/cluster.go b/daemon/cluster/cluster.go index 1d8815b380..b5d4092b08 100644 --- a/daemon/cluster/cluster.go +++ b/daemon/cluster/cluster.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster // // ## Swarmkit integration diff --git a/daemon/cluster/configs.go b/daemon/cluster/configs.go index 46cfefeacc..c1d5dc039b 100644 --- a/daemon/cluster/configs.go +++ b/daemon/cluster/configs.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/controllers/plugin/controller.go b/daemon/cluster/controllers/plugin/controller.go index 919e2dec4a..6420321983 100644 --- a/daemon/cluster/controllers/plugin/controller.go +++ b/daemon/cluster/controllers/plugin/controller.go @@ -1,4 +1,4 @@ -package plugin // import "github.com/docker/docker/daemon/cluster/controllers/plugin" +package plugin import ( "context" diff --git a/daemon/cluster/controllers/plugin/controller_test.go b/daemon/cluster/controllers/plugin/controller_test.go index 415b3b27c7..68c0af6bce 100644 --- a/daemon/cluster/controllers/plugin/controller_test.go +++ b/daemon/cluster/controllers/plugin/controller_test.go @@ -1,4 +1,4 @@ -package plugin // import "github.com/docker/docker/daemon/cluster/controllers/plugin" +package plugin import ( "context" diff --git a/daemon/cluster/convert/config.go b/daemon/cluster/convert/config.go index ec52ad7ac8..01ffd426ac 100644 --- a/daemon/cluster/convert/config.go +++ b/daemon/cluster/convert/config.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( swarmtypes "github.com/docker/docker/api/types/swarm" diff --git a/daemon/cluster/convert/container.go b/daemon/cluster/convert/container.go index 3986aeac3d..631cfcfab5 100644 --- a/daemon/cluster/convert/container.go +++ b/daemon/cluster/convert/container.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "context" diff --git a/daemon/cluster/convert/container_test.go b/daemon/cluster/convert/container_test.go index f000d6fd0d..e9c2666f38 100644 --- a/daemon/cluster/convert/container_test.go +++ b/daemon/cluster/convert/container_test.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "testing" diff --git a/daemon/cluster/convert/network.go b/daemon/cluster/convert/network.go index ebc8eb3b90..39d84ce419 100644 --- a/daemon/cluster/convert/network.go +++ b/daemon/cluster/convert/network.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "strings" diff --git a/daemon/cluster/convert/network_test.go b/daemon/cluster/convert/network_test.go index e996a39d42..38e01e67fb 100644 --- a/daemon/cluster/convert/network_test.go +++ b/daemon/cluster/convert/network_test.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "testing" diff --git a/daemon/cluster/convert/node.go b/daemon/cluster/convert/node.go index 2019b8cfad..cedd736213 100644 --- a/daemon/cluster/convert/node.go +++ b/daemon/cluster/convert/node.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "fmt" diff --git a/daemon/cluster/convert/secret.go b/daemon/cluster/convert/secret.go index 2f2fd18326..1db38bc711 100644 --- a/daemon/cluster/convert/secret.go +++ b/daemon/cluster/convert/secret.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( swarmtypes "github.com/docker/docker/api/types/swarm" diff --git a/daemon/cluster/convert/service.go b/daemon/cluster/convert/service.go index 56c6517fe9..1a86bbb9ab 100644 --- a/daemon/cluster/convert/service.go +++ b/daemon/cluster/convert/service.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "fmt" diff --git a/daemon/cluster/convert/service_test.go b/daemon/cluster/convert/service_test.go index 9b316c3a43..9ed25cc684 100644 --- a/daemon/cluster/convert/service_test.go +++ b/daemon/cluster/convert/service_test.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "testing" diff --git a/daemon/cluster/convert/swarm.go b/daemon/cluster/convert/swarm.go index 620852b589..f3d64ab58a 100644 --- a/daemon/cluster/convert/swarm.go +++ b/daemon/cluster/convert/swarm.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "fmt" diff --git a/daemon/cluster/convert/task.go b/daemon/cluster/convert/task.go index c34938da82..5f913f30f6 100644 --- a/daemon/cluster/convert/task.go +++ b/daemon/cluster/convert/task.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( "strings" diff --git a/daemon/cluster/convert/volume.go b/daemon/cluster/convert/volume.go index a063bb056d..4f5bcd3e55 100644 --- a/daemon/cluster/convert/volume.go +++ b/daemon/cluster/convert/volume.go @@ -1,4 +1,4 @@ -package convert // import "github.com/docker/docker/daemon/cluster/convert" +package convert import ( volumetypes "github.com/docker/docker/api/types/volume" diff --git a/daemon/cluster/errors.go b/daemon/cluster/errors.go index 1371b9ab52..66ff07c76e 100644 --- a/daemon/cluster/errors.go +++ b/daemon/cluster/errors.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster const ( // errNoSwarm is returned on leaving a cluster that was never initialized diff --git a/daemon/cluster/executor/backend.go b/daemon/cluster/executor/backend.go index 31195703a5..810537902c 100644 --- a/daemon/cluster/executor/backend.go +++ b/daemon/cluster/executor/backend.go @@ -1,4 +1,4 @@ -package executor // import "github.com/docker/docker/daemon/cluster/executor" +package executor import ( "context" diff --git a/daemon/cluster/executor/container/adapter.go b/daemon/cluster/executor/container/adapter.go index f478d7562e..22eba087ef 100644 --- a/daemon/cluster/executor/container/adapter.go +++ b/daemon/cluster/executor/container/adapter.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/adapter_test.go b/daemon/cluster/executor/container/adapter_test.go index 8db2b0949d..d1234453e9 100644 --- a/daemon/cluster/executor/container/adapter_test.go +++ b/daemon/cluster/executor/container/adapter_test.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/attachment.go b/daemon/cluster/executor/container/attachment.go index eb1b25e222..3f57024fe3 100644 --- a/daemon/cluster/executor/container/attachment.go +++ b/daemon/cluster/executor/container/attachment.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/container.go b/daemon/cluster/executor/container/container.go index c222ba59bf..5639d7d3d2 100644 --- a/daemon/cluster/executor/container/container.go +++ b/daemon/cluster/executor/container/container.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/container_test.go b/daemon/cluster/executor/container/container_test.go index 25d2b9855b..0538286901 100644 --- a/daemon/cluster/executor/container/container_test.go +++ b/daemon/cluster/executor/container/container_test.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "testing" diff --git a/daemon/cluster/executor/container/controller.go b/daemon/cluster/executor/container/controller.go index 7360d5e688..080b75efcd 100644 --- a/daemon/cluster/executor/container/controller.go +++ b/daemon/cluster/executor/container/controller.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/errors.go b/daemon/cluster/executor/container/errors.go index 4c90b9e0a2..535d9b5706 100644 --- a/daemon/cluster/executor/container/errors.go +++ b/daemon/cluster/executor/container/errors.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "errors" diff --git a/daemon/cluster/executor/container/executor.go b/daemon/cluster/executor/container/executor.go index 521164d02d..9a6bff4cdf 100644 --- a/daemon/cluster/executor/container/executor.go +++ b/daemon/cluster/executor/container/executor.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/health_test.go b/daemon/cluster/executor/container/health_test.go index 412893ddea..f1e191062f 100644 --- a/daemon/cluster/executor/container/health_test.go +++ b/daemon/cluster/executor/container/health_test.go @@ -1,6 +1,6 @@ //go:build !windows -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "context" diff --git a/daemon/cluster/executor/container/validate.go b/daemon/cluster/executor/container/validate.go index 88752198b1..a3f31c85fe 100644 --- a/daemon/cluster/executor/container/validate.go +++ b/daemon/cluster/executor/container/validate.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "errors" diff --git a/daemon/cluster/executor/container/validate_test.go b/daemon/cluster/executor/container/validate_test.go index ae567c439a..5333c95821 100644 --- a/daemon/cluster/executor/container/validate_test.go +++ b/daemon/cluster/executor/container/validate_test.go @@ -1,4 +1,4 @@ -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "os" diff --git a/daemon/cluster/executor/container/validate_unix_test.go b/daemon/cluster/executor/container/validate_unix_test.go index 1bf74b49fb..974fb36795 100644 --- a/daemon/cluster/executor/container/validate_unix_test.go +++ b/daemon/cluster/executor/container/validate_unix_test.go @@ -1,6 +1,6 @@ //go:build !windows -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container const ( testAbsPath = "/foo" diff --git a/daemon/cluster/executor/container/validate_windows_test.go b/daemon/cluster/executor/container/validate_windows_test.go index 1d0f465b6c..e934374031 100644 --- a/daemon/cluster/executor/container/validate_windows_test.go +++ b/daemon/cluster/executor/container/validate_windows_test.go @@ -1,6 +1,6 @@ //go:build windows -package container // import "github.com/docker/docker/daemon/cluster/executor/container" +package container import ( "strings" "testing" diff --git a/daemon/cluster/filters.go b/daemon/cluster/filters.go index a839639369..a7c7bbd173 100644 --- a/daemon/cluster/filters.go +++ b/daemon/cluster/filters.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "fmt" diff --git a/daemon/cluster/filters_test.go b/daemon/cluster/filters_test.go index e870fa10f0..0f32e16adb 100644 --- a/daemon/cluster/filters_test.go +++ b/daemon/cluster/filters_test.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "testing" diff --git a/daemon/cluster/helpers.go b/daemon/cluster/helpers.go index d25d6c1065..dcf1f66268 100644 --- a/daemon/cluster/helpers.go +++ b/daemon/cluster/helpers.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/listen_addr.go b/daemon/cluster/listen_addr.go index c8d5a0deeb..425d779e96 100644 --- a/daemon/cluster/listen_addr.go +++ b/daemon/cluster/listen_addr.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "fmt" diff --git a/daemon/cluster/listen_addr_linux.go b/daemon/cluster/listen_addr_linux.go index e8e2bddadc..7335215ebb 100644 --- a/daemon/cluster/listen_addr_linux.go +++ b/daemon/cluster/listen_addr_linux.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "net" diff --git a/daemon/cluster/listen_addr_others.go b/daemon/cluster/listen_addr_others.go index 20004fac50..3eec68e974 100644 --- a/daemon/cluster/listen_addr_others.go +++ b/daemon/cluster/listen_addr_others.go @@ -1,6 +1,6 @@ //go:build !linux -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import "net" diff --git a/daemon/cluster/networks.go b/daemon/cluster/networks.go index 75ad537259..186f9285b6 100644 --- a/daemon/cluster/networks.go +++ b/daemon/cluster/networks.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/noderunner.go b/daemon/cluster/noderunner.go index 4910d08431..34ebf2a14b 100644 --- a/daemon/cluster/noderunner.go +++ b/daemon/cluster/noderunner.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/nodes.go b/daemon/cluster/nodes.go index 2bb95d2e20..0ea6e9f83b 100644 --- a/daemon/cluster/nodes.go +++ b/daemon/cluster/nodes.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/provider/network.go b/daemon/cluster/provider/network.go index 19da38249d..6bd6b126ca 100644 --- a/daemon/cluster/provider/network.go +++ b/daemon/cluster/provider/network.go @@ -1,4 +1,4 @@ -package provider // import "github.com/docker/docker/daemon/cluster/provider" +package provider import "github.com/docker/docker/api/types/network" diff --git a/daemon/cluster/secrets.go b/daemon/cluster/secrets.go index f3aadc2bb2..d6285a5c28 100644 --- a/daemon/cluster/secrets.go +++ b/daemon/cluster/secrets.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/services.go b/daemon/cluster/services.go index 65734d0852..6f48475025 100644 --- a/daemon/cluster/services.go +++ b/daemon/cluster/services.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/swarm.go b/daemon/cluster/swarm.go index 2b50122d84..51582e47cf 100644 --- a/daemon/cluster/swarm.go +++ b/daemon/cluster/swarm.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/tasks.go b/daemon/cluster/tasks.go index fbc863e5e8..5a9c044ddc 100644 --- a/daemon/cluster/tasks.go +++ b/daemon/cluster/tasks.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context" diff --git a/daemon/cluster/utils.go b/daemon/cluster/utils.go index 2d61b33884..78784ec88c 100644 --- a/daemon/cluster/utils.go +++ b/daemon/cluster/utils.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "encoding/json" diff --git a/daemon/cluster/volumes.go b/daemon/cluster/volumes.go index 1f69e6e580..e27239aabe 100644 --- a/daemon/cluster/volumes.go +++ b/daemon/cluster/volumes.go @@ -1,4 +1,4 @@ -package cluster // import "github.com/docker/docker/daemon/cluster" +package cluster import ( "context"