Skip to content

Commit 07ff4f1

Browse files
committed
goimports: fix imports
Format the source according to latest goimports. Signed-off-by: Kir Kolyshkin <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 56e690f commit 07ff4f1

File tree

125 files changed

+137
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+137
-136
lines changed

api/server/router/distribution/distribution_routes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/docker/docker/api/types"
1616
registrytypes "github.com/docker/docker/api/types/registry"
1717
"github.com/docker/docker/errdefs"
18-
"github.com/opencontainers/image-spec/specs-go/v1"
18+
v1 "github.com/opencontainers/image-spec/specs-go/v1"
1919
"github.com/pkg/errors"
2020
)
2121

api/server/router/system/system.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package system // import "github.com/docker/docker/api/server/router/system"
22

33
import (
44
"github.com/docker/docker/api/server/router"
5-
"github.com/docker/docker/builder/builder-next"
5+
buildkit "github.com/docker/docker/builder/builder-next"
66
"github.com/docker/docker/builder/fscache"
77
)
88

api/types/container/host_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/docker/docker/api/types/mount"
88
"github.com/docker/docker/api/types/strslice"
99
"github.com/docker/go-connections/nat"
10-
"github.com/docker/go-units"
10+
units "github.com/docker/go-units"
1111
)
1212

1313
// CgroupnsMode represents the cgroup namespace mode of the container

api/types/registry/registry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"net"
66

7-
"github.com/opencontainers/image-spec/specs-go/v1"
7+
v1 "github.com/opencontainers/image-spec/specs-go/v1"
88
)
99

1010
// ServiceConfig stores daemon registry services configuration.

builder/builder-next/adapters/containerimage/pull.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/moby/buildkit/util/progress"
3838
"github.com/moby/buildkit/util/resolver"
3939
"github.com/moby/buildkit/util/tracing"
40-
"github.com/opencontainers/go-digest"
40+
digest "github.com/opencontainers/go-digest"
4141
"github.com/opencontainers/image-spec/identity"
4242
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
4343
"github.com/pkg/errors"

builder/dockerfile/copy_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88

9-
"github.com/Microsoft/go-winio"
9+
winio "github.com/Microsoft/go-winio"
1010
"github.com/docker/docker/pkg/idtools"
1111
"github.com/docker/docker/pkg/reexec"
1212
"github.com/docker/docker/pkg/system"

builder/dockerfile/metrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dockerfile // import "github.com/docker/docker/builder/dockerfile"
22

33
import (
4-
"github.com/docker/go-metrics"
4+
metrics "github.com/docker/go-metrics"
55
)
66

77
var (

builder/remotecontext/tarsum.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/docker/docker/pkg/containerfs"
88
iradix "github.com/hashicorp/go-immutable-radix"
9-
"github.com/opencontainers/go-digest"
9+
digest "github.com/opencontainers/go-digest"
1010
"github.com/pkg/errors"
1111
"github.com/tonistiigi/fsutil"
1212
)

client/image_build_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/docker/docker/api/types"
1414
"github.com/docker/docker/api/types/container"
1515
"github.com/docker/docker/errdefs"
16-
"github.com/docker/go-units"
16+
units "github.com/docker/go-units"
1717
)
1818

1919
func TestImageBuildError(t *testing.T) {

client/service_create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/distribution/reference"
1010
"github.com/docker/docker/api/types"
1111
"github.com/docker/docker/api/types/swarm"
12-
"github.com/opencontainers/go-digest"
12+
digest "github.com/opencontainers/go-digest"
1313
"github.com/pkg/errors"
1414
)
1515

client/service_create_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
registrytypes "github.com/docker/docker/api/types/registry"
1515
"github.com/docker/docker/api/types/swarm"
1616
"github.com/docker/docker/errdefs"
17-
"github.com/opencontainers/go-digest"
18-
"github.com/opencontainers/image-spec/specs-go/v1"
17+
digest "github.com/opencontainers/go-digest"
18+
v1 "github.com/opencontainers/image-spec/specs-go/v1"
1919
"gotest.tools/assert"
2020
is "gotest.tools/assert/cmp"
2121
)

cmd/dockerd/config_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/docker/docker/daemon/config"
99
"github.com/docker/docker/opts"
1010
"github.com/docker/docker/rootless"
11-
"github.com/docker/go-units"
11+
units "github.com/docker/go-units"
1212
"github.com/pkg/errors"
1313
"github.com/spf13/pflag"
1414
)

cmd/dockerd/metrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"net"
55
"net/http"
66

7-
"github.com/docker/go-metrics"
7+
metrics "github.com/docker/go-metrics"
88
"github.com/pkg/errors"
99
"github.com/sirupsen/logrus"
1010
)

container/container.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/docker/docker/restartmanager"
3737
"github.com/docker/docker/volume"
3838
volumemounts "github.com/docker/docker/volume/mounts"
39-
"github.com/docker/go-units"
39+
units "github.com/docker/go-units"
4040
agentexec "github.com/docker/swarmkit/agent/exec"
4141
"github.com/pkg/errors"
4242
"github.com/sirupsen/logrus"

container/state.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

1010
"github.com/docker/docker/api/types"
11-
"github.com/docker/go-units"
11+
units "github.com/docker/go-units"
1212
)
1313

1414
// State holds the current container state, and has methods to get and

container/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/docker/api/types"
1010
"github.com/docker/docker/api/types/network"
1111
"github.com/docker/go-connections/nat"
12-
"github.com/hashicorp/go-memdb"
12+
memdb "github.com/hashicorp/go-memdb"
1313
"github.com/sirupsen/logrus"
1414
)
1515

daemon/cluster/controllers/plugin/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/docker/docker/api/types/swarm/runtime"
1212
"github.com/docker/docker/errdefs"
1313
"github.com/docker/docker/plugin"
14-
"github.com/docker/docker/plugin/v2"
14+
v2 "github.com/docker/docker/plugin/v2"
1515
"github.com/docker/swarmkit/api"
1616
"github.com/gogo/protobuf/proto"
1717
"github.com/pkg/errors"

daemon/cluster/controllers/plugin/controller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/docker/docker/api/types/swarm/runtime"
1616
"github.com/docker/docker/pkg/pubsub"
1717
"github.com/docker/docker/plugin"
18-
"github.com/docker/docker/plugin/v2"
18+
v2 "github.com/docker/docker/plugin/v2"
1919
"github.com/sirupsen/logrus"
2020
)
2121

daemon/cluster/executor/container/adapter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/docker/swarmkit/api"
2727
"github.com/docker/swarmkit/log"
2828
gogotypes "github.com/gogo/protobuf/types"
29-
"github.com/opencontainers/go-digest"
29+
digest "github.com/opencontainers/go-digest"
3030
"github.com/pkg/errors"
3131
"github.com/sirupsen/logrus"
3232
"golang.org/x/time/rate"

daemon/config/config_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
containertypes "github.com/docker/docker/api/types/container"
99
"github.com/docker/docker/opts"
10-
"github.com/docker/go-units"
10+
units "github.com/docker/go-units"
1111
)
1212

1313
const (

daemon/config/config_unix_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77

88
"github.com/docker/docker/opts"
9-
"github.com/docker/go-units"
9+
units "github.com/docker/go-units"
1010
"github.com/spf13/pflag"
1111
"gotest.tools/assert"
1212
is "gotest.tools/assert/cmp"

daemon/events/metrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package events // import "github.com/docker/docker/daemon/events"
22

3-
import "github.com/docker/go-metrics"
3+
import metrics "github.com/docker/go-metrics"
44

55
var (
66
eventsCounter metrics.Counter

daemon/exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/docker/docker/pkg/pools"
1818
"github.com/docker/docker/pkg/signal"
1919
"github.com/docker/docker/pkg/term"
20-
"github.com/opencontainers/runtime-spec/specs-go"
20+
specs "github.com/opencontainers/runtime-spec/specs-go"
2121
"github.com/pkg/errors"
2222
"github.com/sirupsen/logrus"
2323
)

daemon/exec_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/docker/docker/daemon/exec"
88
"github.com/docker/docker/oci/caps"
99
"github.com/opencontainers/runc/libcontainer/apparmor"
10-
"github.com/opencontainers/runtime-spec/specs-go"
10+
specs "github.com/opencontainers/runtime-spec/specs-go"
1111
)
1212

1313
func (daemon *Daemon) execSetPlatformOpt(c *container.Container, ec *exec.Config, p *specs.Process) error {

daemon/exec_linux_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/docker/container"
1010
"github.com/docker/docker/daemon/exec"
1111
"github.com/opencontainers/runc/libcontainer/apparmor"
12-
"github.com/opencontainers/runtime-spec/specs-go"
12+
specs "github.com/opencontainers/runtime-spec/specs-go"
1313
"gotest.tools/assert"
1414
)
1515

daemon/graphdriver/btrfs/btrfs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/docker/docker/pkg/mount"
3333
"github.com/docker/docker/pkg/parsers"
3434
"github.com/docker/docker/pkg/system"
35-
"github.com/docker/go-units"
35+
units "github.com/docker/go-units"
3636
"github.com/opencontainers/selinux/go-selinux/label"
3737
"github.com/pkg/errors"
3838
"github.com/sirupsen/logrus"

daemon/graphdriver/devmapper/deviceset.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/docker/docker/pkg/mount"
2828
"github.com/docker/docker/pkg/parsers"
2929
"github.com/docker/docker/pkg/parsers/kernel"
30-
"github.com/docker/go-units"
30+
units "github.com/docker/go-units"
3131
"github.com/opencontainers/selinux/go-selinux/label"
3232
"github.com/pkg/errors"
3333
"github.com/sirupsen/logrus"

daemon/graphdriver/devmapper/driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/docker/docker/pkg/idtools"
1616
"github.com/docker/docker/pkg/locker"
1717
"github.com/docker/docker/pkg/mount"
18-
"github.com/docker/go-units"
18+
units "github.com/docker/go-units"
1919
"github.com/sirupsen/logrus"
2020
"golang.org/x/sys/unix"
2121
)

daemon/graphdriver/graphtest/graphtest_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/docker/docker/daemon/graphdriver"
1616
"github.com/docker/docker/daemon/graphdriver/quota"
1717
"github.com/docker/docker/pkg/stringid"
18-
"github.com/docker/go-units"
18+
units "github.com/docker/go-units"
1919
"golang.org/x/sys/unix"
2020
"gotest.tools/assert"
2121
is "gotest.tools/assert/cmp"

daemon/graphdriver/overlay2/overlay.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/docker/docker/pkg/parsers"
3232
"github.com/docker/docker/pkg/parsers/kernel"
3333
"github.com/docker/docker/pkg/system"
34-
"github.com/docker/go-units"
34+
units "github.com/docker/go-units"
3535
rsystem "github.com/opencontainers/runc/libcontainer/system"
3636
"github.com/opencontainers/selinux/go-selinux/label"
3737
"github.com/sirupsen/logrus"

daemon/graphdriver/plugin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/docker/docker/errdefs"
88
"github.com/docker/docker/pkg/plugingetter"
99
"github.com/docker/docker/pkg/plugins"
10-
"github.com/docker/docker/plugin/v2"
10+
v2 "github.com/docker/docker/plugin/v2"
1111
"github.com/pkg/errors"
1212
)
1313

daemon/graphdriver/vfs/driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/docker/docker/pkg/idtools"
1313
"github.com/docker/docker/pkg/parsers"
1414
"github.com/docker/docker/pkg/system"
15-
"github.com/docker/go-units"
15+
units "github.com/docker/go-units"
1616
"github.com/opencontainers/selinux/go-selinux/label"
1717
"github.com/pkg/errors"
1818
)

daemon/graphdriver/windows/windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"time"
2020
"unsafe"
2121

22-
"github.com/Microsoft/go-winio"
22+
winio "github.com/Microsoft/go-winio"
2323
"github.com/Microsoft/go-winio/archive/tar"
2424
"github.com/Microsoft/go-winio/backuptar"
2525
"github.com/Microsoft/go-winio/vhd"

daemon/images/image_prune.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/docker/docker/errdefs"
1414
"github.com/docker/docker/image"
1515
"github.com/docker/docker/layer"
16-
"github.com/opencontainers/go-digest"
16+
digest "github.com/opencontainers/go-digest"
1717
"github.com/pkg/errors"
1818
"github.com/sirupsen/logrus"
1919
)

daemon/images/image_pull.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/docker/docker/errdefs"
1515
"github.com/docker/docker/pkg/progress"
1616
"github.com/docker/docker/registry"
17-
"github.com/opencontainers/go-digest"
17+
digest "github.com/opencontainers/go-digest"
1818
specs "github.com/opencontainers/image-spec/specs-go/v1"
1919
)
2020

daemon/images/locals.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package images // import "github.com/docker/docker/daemon/images"
33
import (
44
"fmt"
55

6-
"github.com/docker/go-metrics"
6+
metrics "github.com/docker/go-metrics"
77
)
88

99
type invalidFilter struct {

daemon/images/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
dockerreference "github.com/docker/docker/reference"
1616
"github.com/docker/docker/registry"
1717
"github.com/docker/libtrust"
18-
"github.com/opencontainers/go-digest"
18+
digest "github.com/opencontainers/go-digest"
1919
"github.com/pkg/errors"
2020
"github.com/sirupsen/logrus"
2121
)

daemon/info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/docker/docker/pkg/system"
2222
"github.com/docker/docker/registry"
2323
"github.com/docker/go-connections/sockets"
24-
"github.com/docker/go-metrics"
24+
metrics "github.com/docker/go-metrics"
2525
"github.com/sirupsen/logrus"
2626
)
2727

daemon/list_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/docker/docker/container"
1313
"github.com/docker/docker/image"
1414
"github.com/google/uuid"
15-
"github.com/opencontainers/go-digest"
15+
digest "github.com/opencontainers/go-digest"
1616
"gotest.tools/assert"
1717
is "gotest.tools/assert/cmp"
1818
)

daemon/listeners/listeners_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net"
77
"strings"
88

9-
"github.com/Microsoft/go-winio"
9+
winio "github.com/Microsoft/go-winio"
1010
"github.com/docker/go-connections/sockets"
1111
)
1212

daemon/logger/factory.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
containertypes "github.com/docker/docker/api/types/container"
99
"github.com/docker/docker/pkg/plugingetter"
10-
"github.com/docker/go-units"
10+
units "github.com/docker/go-units"
1111
"github.com/pkg/errors"
1212
)
1313

daemon/logger/fluentd/fluentd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/docker/docker/daemon/logger"
1515
"github.com/docker/docker/daemon/logger/loggerutils"
1616
"github.com/docker/docker/pkg/urlutil"
17-
"github.com/docker/go-units"
17+
units "github.com/docker/go-units"
1818
"github.com/fluent/fluent-logger-golang/fluent"
1919
"github.com/pkg/errors"
2020
"github.com/sirupsen/logrus"

daemon/logger/jsonfilelog/jsonfilelog.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/docker/docker/daemon/logger"
1414
"github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog"
1515
"github.com/docker/docker/daemon/logger/loggerutils"
16-
"github.com/docker/go-units"
16+
units "github.com/docker/go-units"
1717
"github.com/pkg/errors"
1818
"github.com/sirupsen/logrus"
1919
)

daemon/logger/local/local.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/docker/docker/daemon/logger"
1313
"github.com/docker/docker/daemon/logger/loggerutils"
1414
"github.com/docker/docker/errdefs"
15-
"github.com/docker/go-units"
15+
units "github.com/docker/go-units"
1616
"github.com/pkg/errors"
1717
"github.com/sirupsen/logrus"
1818
)

0 commit comments

Comments
 (0)