From a1150245ccbcbe30ea9f85053ba55bd125cd7e4c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Aug 2021 15:14:53 +0200 Subject: [PATCH] Update to Go 1.17.0, and gofmt with Go 1.17 Movified from 686be57d0a6e514c0cddb2f3ac9cbb3cbef87f5f, and re-ran gofmt again to address for files not present in 20.10 and vice-versa. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 686be57d0a6e514c0cddb2f3ac9cbb3cbef87f5f) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 2 +- Dockerfile.e2e | 2 +- Dockerfile.simple | 2 +- Dockerfile.windows | 2 +- api/common_unix.go | 1 + api/types/container/hostconfig_unix.go | 1 + builder/builder-next/executor_unix.go | 1 + builder/builder-next/worker/gc_unix.go | 1 + builder/builder-next/worker/gc_windows.go | 1 + builder/dockerfile/builder_unix.go | 1 + builder/dockerfile/copy_unix.go | 1 + builder/dockerfile/dispatchers_unix.go | 1 + builder/dockerfile/dispatchers_unix_test.go | 1 + builder/dockerfile/dispatchers_windows_test.go | 1 + builder/dockerfile/internals_windows_test.go | 1 + client/client_unix.go | 1 + cmd/dockerd/config_common_unix.go | 1 + cmd/dockerd/config_unix.go | 1 + cmd/dockerd/config_unix_test.go | 1 + cmd/dockerd/daemon_unix.go | 1 + cmd/dockerd/daemon_unix_test.go | 1 + cmd/dockerd/docker_unix.go | 1 + cmd/dockerd/service_unsupported.go | 1 + container/container_unix.go | 1 + container/mounts_unix.go | 1 + contrib/docker-device-tool/device_tool.go | 1 + daemon/apparmor_default.go | 1 + daemon/apparmor_default_unsupported.go | 1 + daemon/archive_tarcopyoptions_unix.go | 1 + daemon/archive_unix.go | 1 + daemon/cluster/executor/container/health_test.go | 1 + daemon/cluster/executor/container/validate_unix_test.go | 1 + daemon/cluster/executor/container/validate_windows_test.go | 1 + daemon/cluster/listen_addr_others.go | 1 + daemon/config/config_common_unix.go | 1 + daemon/config/config_common_unix_test.go | 1 + daemon/config/config_unix.go | 1 + daemon/config/config_unix_test.go | 1 + daemon/config/config_windows_test.go | 1 + daemon/configs_unsupported.go | 1 + daemon/container_linux.go | 3 ++- daemon/container_operations_unix.go | 1 + daemon/container_unix_test.go | 1 + daemon/create_unix.go | 1 + daemon/daemon_linux_test.go | 1 + daemon/daemon_unix.go | 1 + daemon/daemon_unix_test.go | 1 + daemon/daemon_unsupported.go | 1 + daemon/daemon_windows_test.go | 1 + daemon/debugtrap_unix.go | 1 + daemon/debugtrap_unsupported.go | 1 + daemon/exec_linux_test.go | 1 + daemon/graphdriver/aufs/aufs.go | 1 + daemon/graphdriver/aufs/aufs_test.go | 1 + daemon/graphdriver/aufs/dirs.go | 1 + daemon/graphdriver/aufs/mount.go | 1 + daemon/graphdriver/btrfs/btrfs.go | 1 + daemon/graphdriver/btrfs/btrfs_test.go | 1 + daemon/graphdriver/btrfs/dummy_unsupported.go | 1 + daemon/graphdriver/btrfs/version.go | 1 + daemon/graphdriver/btrfs/version_test.go | 1 + daemon/graphdriver/copy/copy.go | 1 + daemon/graphdriver/copy/copy_test.go | 1 + daemon/graphdriver/devmapper/deviceset.go | 1 + daemon/graphdriver/devmapper/devmapper_test.go | 1 + daemon/graphdriver/devmapper/driver.go | 1 + daemon/graphdriver/devmapper/mount.go | 1 + daemon/graphdriver/driver_unsupported.go | 1 + daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go | 1 + daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_test.go | 1 + .../fuse-overlayfs/fuseoverlayfs_unsupported.go | 1 + daemon/graphdriver/graphtest/graphbench_unix.go | 1 + daemon/graphdriver/graphtest/graphtest_unix.go | 1 + daemon/graphdriver/graphtest/testutil_unix.go | 1 + daemon/graphdriver/lcow/lcow.go | 1 + daemon/graphdriver/lcow/lcow_svm.go | 1 + daemon/graphdriver/lcow/remotefs.go | 1 + daemon/graphdriver/lcow/remotefs_file.go | 1 + daemon/graphdriver/lcow/remotefs_filedriver.go | 1 + daemon/graphdriver/lcow/remotefs_pathdriver.go | 1 + daemon/graphdriver/overlay/overlay.go | 1 + daemon/graphdriver/overlay/overlay_test.go | 1 + daemon/graphdriver/overlay/overlay_unsupported.go | 1 + daemon/graphdriver/overlay2/check.go | 1 + daemon/graphdriver/overlay2/mount.go | 1 + daemon/graphdriver/overlay2/overlay.go | 1 + daemon/graphdriver/overlay2/overlay_test.go | 1 + daemon/graphdriver/overlay2/overlay_unsupported.go | 1 + daemon/graphdriver/overlayutils/overlayutils.go | 1 + daemon/graphdriver/overlayutils/randomid.go | 1 + daemon/graphdriver/overlayutils/userxattr.go | 1 + daemon/graphdriver/register/register_aufs.go | 1 + daemon/graphdriver/register/register_btrfs.go | 1 + daemon/graphdriver/register/register_devicemapper.go | 1 + daemon/graphdriver/register/register_fuseoverlayfs.go | 1 + daemon/graphdriver/register/register_overlay.go | 1 + daemon/graphdriver/register/register_overlay2.go | 1 + daemon/graphdriver/register/register_zfs.go | 1 + daemon/graphdriver/vfs/copy_unsupported.go | 1 + daemon/graphdriver/vfs/quota_unsupported.go | 1 + daemon/graphdriver/vfs/vfs_test.go | 1 + daemon/graphdriver/windows/windows.go | 3 ++- daemon/graphdriver/zfs/zfs.go | 1 + daemon/graphdriver/zfs/zfs_test.go | 1 + daemon/graphdriver/zfs/zfs_unsupported.go | 1 + daemon/images/image_unix.go | 1 + daemon/info_unix.go | 1 + daemon/info_unix_test.go | 1 + daemon/initlayer/setup_unix.go | 1 + daemon/keys.go | 1 + daemon/keys_unsupported.go | 1 + daemon/list_unix.go | 1 + daemon/listeners/group_unix.go | 1 + daemon/logger/gcplogs/gcplogging_others.go | 1 + daemon/logger/gelf/gelf_test.go | 1 + daemon/logger/journald/journald.go | 1 + daemon/logger/journald/journald_test.go | 1 + daemon/logger/journald/journald_unsupported.go | 1 + daemon/logger/journald/read.go | 1 + daemon/logger/journald/read_native.go | 1 + daemon/logger/journald/read_native_compat.go | 1 + daemon/logger/journald/read_unsupported.go | 1 + daemon/logger/loggerutils/file_unix.go | 1 + daemon/logger/plugin_unix.go | 1 + daemon/logger/plugin_unsupported.go | 1 + daemon/metrics_unix.go | 1 + daemon/metrics_unsupported.go | 1 + daemon/network/filter_test.go | 1 + daemon/reload_unix.go | 1 + daemon/resize_test.go | 1 + daemon/runtime_unix.go | 1 + daemon/seccomp_disabled.go | 1 + daemon/seccomp_linux.go | 1 + daemon/seccomp_unsupported.go | 1 + daemon/secrets_unsupported.go | 1 + daemon/start_unix.go | 1 + daemon/stats/collector_unix.go | 1 + daemon/stats_unix.go | 1 + daemon/top_unix.go | 3 ++- daemon/top_unix_test.go | 3 ++- daemon/util_test.go | 1 + daemon/volumes_unix.go | 1 + daemon/volumes_unix_test.go | 1 + distribution/pull_v2_unix.go | 1 + dockerversion/version_lib.go | 1 + integration-cli/docker_api_build_windows_test.go | 1 + integration-cli/docker_api_containers_unix_test.go | 1 + integration-cli/docker_api_containers_windows_test.go | 1 + integration-cli/docker_api_swarm_node_test.go | 1 + integration-cli/docker_api_swarm_service_test.go | 1 + integration-cli/docker_api_swarm_test.go | 1 + integration-cli/docker_cli_attach_unix_test.go | 1 + integration-cli/docker_cli_build_unix_test.go | 1 + integration-cli/docker_cli_cp_to_container_unix_test.go | 1 + integration-cli/docker_cli_daemon_plugins_test.go | 1 + integration-cli/docker_cli_daemon_test.go | 1 + integration-cli/docker_cli_events_unix_test.go | 1 + integration-cli/docker_cli_exec_unix_test.go | 1 + integration-cli/docker_cli_info_unix_test.go | 1 + integration-cli/docker_cli_network_unix_test.go | 1 + integration-cli/docker_cli_prune_unix_test.go | 1 + integration-cli/docker_cli_run_unix_test.go | 1 + integration-cli/docker_cli_save_load_unix_test.go | 1 + integration-cli/docker_cli_service_create_test.go | 1 + integration-cli/docker_cli_service_health_test.go | 1 + integration-cli/docker_cli_service_logs_test.go | 1 + integration-cli/docker_cli_service_scale_test.go | 1 + integration-cli/docker_cli_swarm_test.go | 1 + integration-cli/docker_cli_swarm_unix_test.go | 1 + integration-cli/docker_cli_update_unix_test.go | 1 + integration-cli/docker_cli_userns_test.go | 1 + integration-cli/docker_deprecated_api_v124_unix_test.go | 1 + integration-cli/requirements_unix_test.go | 1 + integration-cli/test_vars_noseccomp_test.go | 1 + integration-cli/test_vars_seccomp_test.go | 1 + integration-cli/test_vars_unix_test.go | 1 + integration-cli/test_vars_windows_test.go | 1 + integration/image/remove_unix_test.go | 1 + integration/internal/requirement/requirement_windows.go | 1 + integration/network/helpers.go | 1 + integration/network/ipvlan/ipvlan_test.go | 1 + integration/network/ipvlan/main_test.go | 1 + integration/network/macvlan/macvlan_test.go | 1 + integration/network/macvlan/main_test.go | 1 + integration/plugin/authz/authz_plugin_test.go | 1 + integration/plugin/authz/authz_plugin_v2_test.go | 1 + integration/plugin/authz/main_test.go | 1 + integration/plugin/logging/validation_test.go | 1 + integration/system/info_linux_test.go | 1 + layer/filestore_unix.go | 1 + layer/layer_unix.go | 1 + layer/layer_unix_test.go | 1 + oci/devices_unsupported.go | 1 + oci/seccomp_test.go | 1 + opts/hosts_unix.go | 1 + pkg/archive/archive_other.go | 1 + pkg/archive/archive_unix.go | 1 + pkg/archive/archive_unix_test.go | 1 + pkg/archive/archive_windows_test.go | 1 + pkg/archive/changes_other.go | 1 + pkg/archive/changes_unix.go | 1 + pkg/archive/copy_unix.go | 1 + pkg/archive/copy_unix_test.go | 1 + pkg/archive/example_changes.go | 1 + pkg/archive/time_unsupported.go | 1 + pkg/authorization/authz_unix_test.go | 1 + pkg/authorization/middleware_unix_test.go | 1 + pkg/chrootarchive/archive_unix.go | 1 + pkg/chrootarchive/archive_unix_test.go | 1 + pkg/chrootarchive/chroot_unix.go | 1 + pkg/chrootarchive/diff_unix.go | 3 ++- pkg/chrootarchive/init_unix.go | 1 + pkg/containerfs/containerfs_unix.go | 1 + pkg/devicemapper/devmapper.go | 1 + pkg/devicemapper/devmapper_log.go | 1 + pkg/devicemapper/devmapper_wrapper.go | 1 + pkg/devicemapper/devmapper_wrapper_dynamic.go | 1 + .../devmapper_wrapper_dynamic_deferred_remove.go | 4 ++-- .../devmapper_wrapper_dynamic_dlsym_deferred_remove.go | 4 ++-- pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go | 4 ++-- pkg/devicemapper/ioctl.go | 1 + pkg/directory/directory_unix.go | 1 + pkg/fileutils/fileutils_unix.go | 1 + pkg/fsutils/fsutils_linux_test.go | 1 + pkg/homedir/homedir_others.go | 1 + pkg/homedir/homedir_unix.go | 1 + pkg/idtools/idtools_unix.go | 1 + pkg/idtools/idtools_unix_test.go | 1 + pkg/idtools/usergroupadd_unsupported.go | 1 + pkg/idtools/utils_unix.go | 1 + pkg/ioutils/temp_unix.go | 1 + pkg/loopback/attach_loopback.go | 1 + pkg/loopback/ioctl.go | 1 + pkg/loopback/loop_wrapper.go | 1 + pkg/loopback/loopback.go | 1 + pkg/mount/deprecated_unix.go | 1 + pkg/parsers/kernel/kernel.go | 1 + pkg/parsers/kernel/kernel_darwin.go | 1 + pkg/parsers/kernel/kernel_unix.go | 1 + pkg/parsers/kernel/kernel_unix_test.go | 1 + pkg/parsers/kernel/uname_unsupported.go | 1 + pkg/parsers/operatingsystem/operatingsystem_linux_test.go | 1 + pkg/parsers/operatingsystem/operatingsystem_unix.go | 1 + pkg/pidfile/pidfile_darwin.go | 1 + pkg/pidfile/pidfile_unix.go | 1 + pkg/platform/architecture_unix.go | 1 + pkg/plugins/discovery_unix.go | 1 + pkg/plugins/discovery_unix_test.go | 1 + pkg/plugins/plugins_unix.go | 1 + pkg/reexec/command_unix.go | 1 + pkg/reexec/command_unsupported.go | 1 + pkg/signal/signal_linux.go | 1 + pkg/signal/signal_linux_mipsx.go | 1 + pkg/signal/signal_linux_test.go | 1 + pkg/signal/signal_unix.go | 1 + pkg/signal/signal_unsupported.go | 1 + pkg/signal/trap_linux_test.go | 1 + pkg/sysinfo/numcpu.go | 1 + pkg/sysinfo/sysinfo_unix.go | 1 + pkg/system/chtimes_nowindows.go | 1 + pkg/system/chtimes_windows_test.go | 1 + pkg/system/filesys_unix.go | 1 + pkg/system/lcow.go | 1 + pkg/system/lcow_unsupported.go | 1 + pkg/system/lstat_unix.go | 1 + pkg/system/lstat_unix_test.go | 1 + pkg/system/meminfo_unix_test.go | 1 + pkg/system/meminfo_unsupported.go | 1 + pkg/system/mknod.go | 1 + pkg/system/path_unix.go | 1 + pkg/system/path_windows_test.go | 1 + pkg/system/process_unix.go | 1 + pkg/system/rm.go | 1 + pkg/system/rm_nodarwin_test.go | 1 + pkg/system/rm_test.go | 1 + pkg/system/stat_bsd.go | 1 + pkg/system/stat_unix.go | 1 + pkg/system/stat_unix_test.go | 1 + pkg/system/syscall_unix.go | 1 + pkg/system/umask.go | 1 + pkg/system/utimes_unix.go | 1 + pkg/system/utimes_unix_test.go | 1 + pkg/system/utimes_unsupported.go | 1 + pkg/system/xattrs_unsupported.go | 1 + pkg/term/deprecated_unix.go | 1 + pkg/term/windows/deprecated.go | 1 + plugin/backend_unsupported.go | 1 + plugin/v2/plugin_unsupported.go | 1 + profiles/apparmor/apparmor.go | 1 + profiles/apparmor/template.go | 1 + profiles/seccomp/default_linux.go | 1 + profiles/seccomp/generate.go | 1 + profiles/seccomp/seccomp_test.go | 1 + profiles/seccomp/seccomp_unsupported.go | 1 + quota/projectquota.go | 1 + quota/projectquota_test.go | 1 + quota/projectquota_unsupported.go | 1 + quota/testhelpers.go | 1 + registry/config_unix.go | 1 + runconfig/config_unix.go | 1 + runconfig/hostconfig_test.go | 1 + runconfig/hostconfig_unix.go | 1 + runconfig/hostconfig_windows_test.go | 1 + testutil/daemon/daemon_unix.go | 1 + testutil/request/npipe.go | 1 + volume/local/local_linux_test.go | 1 + volume/local/local_unix.go | 7 ++++--- volume/mounts/validate_unix_test.go | 1 + volume/mounts/volume_unix.go | 1 + volume/service/default_driver.go | 1 + volume/service/default_driver_stubs.go | 1 + volume/service/store_unix.go | 1 + 312 files changed, 323 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20dea15b82..4111e42b0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG CROSS="false" ARG SYSTEMD="false" # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored -ARG GO_VERSION=1.16.15 +ARG GO_VERSION=1.17.0 ARG DEBIAN_FRONTEND=noninteractive ARG VPNKIT_VERSION=0.5.0 ARG DOCKER_BUILDTAGS="apparmor seccomp" diff --git a/Dockerfile.e2e b/Dockerfile.e2e index 73e1941557..84082f4f6a 100644 --- a/Dockerfile.e2e +++ b/Dockerfile.e2e @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16.15 +ARG GO_VERSION=1.17.0 FROM golang:${GO_VERSION}-alpine AS base ENV GO111MODULE=off diff --git a/Dockerfile.simple b/Dockerfile.simple index 49b40eb108..f2f63a9a91 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -5,7 +5,7 @@ # This represents the bare minimum required to build and test Docker. -ARG GO_VERSION=1.16.15 +ARG GO_VERSION=1.17.0 FROM golang:${GO_VERSION}-buster ENV GO111MODULE=off diff --git a/Dockerfile.windows b/Dockerfile.windows index 2100ed373d..be75c39820 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -165,7 +165,7 @@ FROM microsoft/windowsservercore # Use PowerShell as the default shell SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ARG GO_VERSION=1.16.15 +ARG GO_VERSION=1.17.0 ARG GOTESTSUM_VERSION=v1.7.0 # Environment variable notes: diff --git a/api/common_unix.go b/api/common_unix.go index 504b0c90d7..19fc63d658 100644 --- a/api/common_unix.go +++ b/api/common_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package api // import "github.com/docker/docker/api" diff --git a/api/types/container/hostconfig_unix.go b/api/types/container/hostconfig_unix.go index cf6fdf4402..24c4fa8d90 100644 --- a/api/types/container/hostconfig_unix.go +++ b/api/types/container/hostconfig_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package container // import "github.com/docker/docker/api/types/container" diff --git a/builder/builder-next/executor_unix.go b/builder/builder-next/executor_unix.go index 5dbf64c182..ad8377dc83 100644 --- a/builder/builder-next/executor_unix.go +++ b/builder/builder-next/executor_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package buildkit diff --git a/builder/builder-next/worker/gc_unix.go b/builder/builder-next/worker/gc_unix.go index 7457a06654..2660b33abc 100644 --- a/builder/builder-next/worker/gc_unix.go +++ b/builder/builder-next/worker/gc_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package worker diff --git a/builder/builder-next/worker/gc_windows.go b/builder/builder-next/worker/gc_windows.go index 1ffcce41db..748be9041d 100644 --- a/builder/builder-next/worker/gc_windows.go +++ b/builder/builder-next/worker/gc_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package worker diff --git a/builder/dockerfile/builder_unix.go b/builder/dockerfile/builder_unix.go index c4453459b3..7d10028575 100644 --- a/builder/dockerfile/builder_unix.go +++ b/builder/dockerfile/builder_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/builder/dockerfile/copy_unix.go b/builder/dockerfile/copy_unix.go index d2a16e0220..8bc384a8dc 100644 --- a/builder/dockerfile/copy_unix.go +++ b/builder/dockerfile/copy_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/builder/dockerfile/dispatchers_unix.go b/builder/dockerfile/dispatchers_unix.go index 866bc6264d..87dbe72192 100644 --- a/builder/dockerfile/dispatchers_unix.go +++ b/builder/dockerfile/dispatchers_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/builder/dockerfile/dispatchers_unix_test.go b/builder/dockerfile/dispatchers_unix_test.go index c2aebfbb27..3f39e26929 100644 --- a/builder/dockerfile/dispatchers_unix_test.go +++ b/builder/dockerfile/dispatchers_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/builder/dockerfile/dispatchers_windows_test.go b/builder/dockerfile/dispatchers_windows_test.go index ae72092c4f..aef8b047dd 100644 --- a/builder/dockerfile/dispatchers_windows_test.go +++ b/builder/dockerfile/dispatchers_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/builder/dockerfile/internals_windows_test.go b/builder/dockerfile/internals_windows_test.go index 1694ee8ac0..c92727d2b2 100644 --- a/builder/dockerfile/internals_windows_test.go +++ b/builder/dockerfile/internals_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package dockerfile // import "github.com/docker/docker/builder/dockerfile" diff --git a/client/client_unix.go b/client/client_unix.go index 9d0f0dcbf0..5846f888fe 100644 --- a/client/client_unix.go +++ b/client/client_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || openbsd || netbsd || darwin || solaris || illumos || dragonfly // +build linux freebsd openbsd netbsd darwin solaris illumos dragonfly package client // import "github.com/docker/docker/client" diff --git a/cmd/dockerd/config_common_unix.go b/cmd/dockerd/config_common_unix.go index 021b2b28a2..5993674d29 100644 --- a/cmd/dockerd/config_common_unix.go +++ b/cmd/dockerd/config_common_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package main diff --git a/cmd/dockerd/config_unix.go b/cmd/dockerd/config_unix.go index 7ae58281d1..f463686dc6 100644 --- a/cmd/dockerd/config_unix.go +++ b/cmd/dockerd/config_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package main diff --git a/cmd/dockerd/config_unix_test.go b/cmd/dockerd/config_unix_test.go index b927d11384..1ffe4c1fbf 100644 --- a/cmd/dockerd/config_unix_test.go +++ b/cmd/dockerd/config_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package main diff --git a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go index 2500260028..46ed13fb53 100644 --- a/cmd/dockerd/daemon_unix.go +++ b/cmd/dockerd/daemon_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/cmd/dockerd/daemon_unix_test.go b/cmd/dockerd/daemon_unix_test.go index ce9354540c..4ead3d2d3d 100644 --- a/cmd/dockerd/daemon_unix_test.go +++ b/cmd/dockerd/daemon_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/cmd/dockerd/docker_unix.go b/cmd/dockerd/docker_unix.go index 5165af775a..b7e30350ea 100644 --- a/cmd/dockerd/docker_unix.go +++ b/cmd/dockerd/docker_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/cmd/dockerd/service_unsupported.go b/cmd/dockerd/service_unsupported.go index bbcb7f3f3b..907fd6ebca 100644 --- a/cmd/dockerd/service_unsupported.go +++ b/cmd/dockerd/service_unsupported.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/container/container_unix.go b/container/container_unix.go index 7a49ff55aa..1a6c08c214 100644 --- a/container/container_unix.go +++ b/container/container_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package container // import "github.com/docker/docker/container" diff --git a/container/mounts_unix.go b/container/mounts_unix.go index 2c1160464b..168286889a 100644 --- a/container/mounts_unix.go +++ b/container/mounts_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package container // import "github.com/docker/docker/container" diff --git a/contrib/docker-device-tool/device_tool.go b/contrib/docker-device-tool/device_tool.go index b256a3669b..a9f3d720c3 100644 --- a/contrib/docker-device-tool/device_tool.go +++ b/contrib/docker-device-tool/device_tool.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/daemon/apparmor_default.go b/daemon/apparmor_default.go index a7cc3a5ef4..21813ec14f 100644 --- a/daemon/apparmor_default.go +++ b/daemon/apparmor_default.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/apparmor_default_unsupported.go b/daemon/apparmor_default_unsupported.go index dd581dc7da..e3dc18b32b 100644 --- a/daemon/apparmor_default_unsupported.go +++ b/daemon/apparmor_default_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/archive_tarcopyoptions_unix.go b/daemon/archive_tarcopyoptions_unix.go index c456b410dd..52f1ce7dbe 100644 --- a/daemon/archive_tarcopyoptions_unix.go +++ b/daemon/archive_tarcopyoptions_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/archive_unix.go b/daemon/archive_unix.go index 50e6fe24be..0d81bef8f6 100644 --- a/daemon/archive_unix.go +++ b/daemon/archive_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/cluster/executor/container/health_test.go b/daemon/cluster/executor/container/health_test.go index 03d6273635..3c2aeb6d17 100644 --- a/daemon/cluster/executor/container/health_test.go +++ b/daemon/cluster/executor/container/health_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package container // import "github.com/docker/docker/daemon/cluster/executor/container" diff --git a/daemon/cluster/executor/container/validate_unix_test.go b/daemon/cluster/executor/container/validate_unix_test.go index 7a3f053621..bf57b9c7ff 100644 --- a/daemon/cluster/executor/container/validate_unix_test.go +++ b/daemon/cluster/executor/container/validate_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package container // import "github.com/docker/docker/daemon/cluster/executor/container" diff --git a/daemon/cluster/executor/container/validate_windows_test.go b/daemon/cluster/executor/container/validate_windows_test.go index e0d5bc2e60..09f3ff4a1e 100644 --- a/daemon/cluster/executor/container/validate_windows_test.go +++ b/daemon/cluster/executor/container/validate_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package container // import "github.com/docker/docker/daemon/cluster/executor/container" diff --git a/daemon/cluster/listen_addr_others.go b/daemon/cluster/listen_addr_others.go index fe75848e57..de3d25381b 100644 --- a/daemon/cluster/listen_addr_others.go +++ b/daemon/cluster/listen_addr_others.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package cluster // import "github.com/docker/docker/daemon/cluster" diff --git a/daemon/config/config_common_unix.go b/daemon/config/config_common_unix.go index 0a862d3b50..2ab07d1244 100644 --- a/daemon/config/config_common_unix.go +++ b/daemon/config/config_common_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package config // import "github.com/docker/docker/daemon/config" diff --git a/daemon/config/config_common_unix_test.go b/daemon/config/config_common_unix_test.go index 47774a8ec1..3083d7f002 100644 --- a/daemon/config/config_common_unix_test.go +++ b/daemon/config/config_common_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package config // import "github.com/docker/docker/daemon/config" diff --git a/daemon/config/config_unix.go b/daemon/config/config_unix.go index 4a32f55cbf..fb995b02f6 100644 --- a/daemon/config/config_unix.go +++ b/daemon/config/config_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package config // import "github.com/docker/docker/daemon/config" diff --git a/daemon/config/config_unix_test.go b/daemon/config/config_unix_test.go index 3e5c366c6e..e1c583bcb4 100644 --- a/daemon/config/config_unix_test.go +++ b/daemon/config/config_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package config // import "github.com/docker/docker/daemon/config" diff --git a/daemon/config/config_windows_test.go b/daemon/config/config_windows_test.go index ad75104cf0..6a4a8cb4fc 100644 --- a/daemon/config/config_windows_test.go +++ b/daemon/config/config_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package config // import "github.com/docker/docker/daemon/config" diff --git a/daemon/configs_unsupported.go b/daemon/configs_unsupported.go index ae6f14f54e..ce98148ee7 100644 --- a/daemon/configs_unsupported.go +++ b/daemon/configs_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/container_linux.go b/daemon/container_linux.go index b3a19724d2..8d449f700b 100644 --- a/daemon/container_linux.go +++ b/daemon/container_linux.go @@ -1,4 +1,5 @@ -//+build !windows +//go:build !windows +// +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go index 6a50b99bd2..75b4b09b8d 100644 --- a/daemon/container_operations_unix.go +++ b/daemon/container_operations_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/container_unix_test.go b/daemon/container_unix_test.go index 4b35f63db0..e0142cb7ec 100644 --- a/daemon/container_unix_test.go +++ b/daemon/container_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package daemon diff --git a/daemon/create_unix.go b/daemon/create_unix.go index a1ad3570c1..f6f9649eb5 100644 --- a/daemon/create_unix.go +++ b/daemon/create_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/daemon_linux_test.go b/daemon/daemon_linux_test.go index 8e13523fda..78b41e6f0b 100644 --- a/daemon/daemon_linux_test.go +++ b/daemon/daemon_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 48abbd79ce..0aaf08db48 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index 7c072a5a00..cdad58596e 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/daemon_unsupported.go b/daemon/daemon_unsupported.go index 4c2476edcf..9b41669b30 100644 --- a/daemon/daemon_unsupported.go +++ b/daemon/daemon_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !freebsd && !windows // +build !linux,!freebsd,!windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/daemon_windows_test.go b/daemon/daemon_windows_test.go index a4d8b6a20a..32ee182588 100644 --- a/daemon/daemon_windows_test.go +++ b/daemon/daemon_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/debugtrap_unix.go b/daemon/debugtrap_unix.go index bb0adfcc08..8d8d6cd3c1 100644 --- a/daemon/debugtrap_unix.go +++ b/daemon/debugtrap_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/debugtrap_unsupported.go b/daemon/debugtrap_unsupported.go index 30f631c36a..79e27ba6ed 100644 --- a/daemon/debugtrap_unsupported.go +++ b/daemon/debugtrap_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !darwin && !freebsd && !windows // +build !linux,!darwin,!freebsd,!windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/exec_linux_test.go b/daemon/exec_linux_test.go index fe37ead115..925a81bc5d 100644 --- a/daemon/exec_linux_test.go +++ b/daemon/exec_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon diff --git a/daemon/graphdriver/aufs/aufs.go b/daemon/graphdriver/aufs/aufs.go index cfa18666d9..779e3c4dd8 100644 --- a/daemon/graphdriver/aufs/aufs.go +++ b/daemon/graphdriver/aufs/aufs.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux /* diff --git a/daemon/graphdriver/aufs/aufs_test.go b/daemon/graphdriver/aufs/aufs_test.go index e39caa1b49..b79225f20d 100644 --- a/daemon/graphdriver/aufs/aufs_test.go +++ b/daemon/graphdriver/aufs/aufs_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package aufs // import "github.com/docker/docker/daemon/graphdriver/aufs" diff --git a/daemon/graphdriver/aufs/dirs.go b/daemon/graphdriver/aufs/dirs.go index e60be5e3c9..161ca92714 100644 --- a/daemon/graphdriver/aufs/dirs.go +++ b/daemon/graphdriver/aufs/dirs.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package aufs // import "github.com/docker/docker/daemon/graphdriver/aufs" diff --git a/daemon/graphdriver/aufs/mount.go b/daemon/graphdriver/aufs/mount.go index 029321e910..33ee5a6400 100644 --- a/daemon/graphdriver/aufs/mount.go +++ b/daemon/graphdriver/aufs/mount.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package aufs // import "github.com/docker/docker/daemon/graphdriver/aufs" diff --git a/daemon/graphdriver/btrfs/btrfs.go b/daemon/graphdriver/btrfs/btrfs.go index 8fd2854a26..fa0cdf8666 100644 --- a/daemon/graphdriver/btrfs/btrfs.go +++ b/daemon/graphdriver/btrfs/btrfs.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs" diff --git a/daemon/graphdriver/btrfs/btrfs_test.go b/daemon/graphdriver/btrfs/btrfs_test.go index b70e93bc2d..63c3adbe1c 100644 --- a/daemon/graphdriver/btrfs/btrfs_test.go +++ b/daemon/graphdriver/btrfs/btrfs_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs" diff --git a/daemon/graphdriver/btrfs/dummy_unsupported.go b/daemon/graphdriver/btrfs/dummy_unsupported.go index d7793f8794..490ba4c901 100644 --- a/daemon/graphdriver/btrfs/dummy_unsupported.go +++ b/daemon/graphdriver/btrfs/dummy_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux || !cgo // +build !linux !cgo package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs" diff --git a/daemon/graphdriver/btrfs/version.go b/daemon/graphdriver/btrfs/version.go index f6db8e64c7..635e976813 100644 --- a/daemon/graphdriver/btrfs/version.go +++ b/daemon/graphdriver/btrfs/version.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs" diff --git a/daemon/graphdriver/btrfs/version_test.go b/daemon/graphdriver/btrfs/version_test.go index 7c373ecea7..0f8652f0de 100644 --- a/daemon/graphdriver/btrfs/version_test.go +++ b/daemon/graphdriver/btrfs/version_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs" diff --git a/daemon/graphdriver/copy/copy.go b/daemon/graphdriver/copy/copy.go index 962eddfd7b..7bca046e5e 100644 --- a/daemon/graphdriver/copy/copy.go +++ b/daemon/graphdriver/copy/copy.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package copy // import "github.com/docker/docker/daemon/graphdriver/copy" diff --git a/daemon/graphdriver/copy/copy_test.go b/daemon/graphdriver/copy/copy_test.go index 5fac6fc411..aa1e957592 100644 --- a/daemon/graphdriver/copy/copy_test.go +++ b/daemon/graphdriver/copy/copy_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package copy // import "github.com/docker/docker/daemon/graphdriver/copy" diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index 590e062123..e3db2803ac 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package devmapper // import "github.com/docker/docker/daemon/graphdriver/devmapper" diff --git a/daemon/graphdriver/devmapper/devmapper_test.go b/daemon/graphdriver/devmapper/devmapper_test.go index afd6c5b4d9..e7ded127f1 100644 --- a/daemon/graphdriver/devmapper/devmapper_test.go +++ b/daemon/graphdriver/devmapper/devmapper_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package devmapper // import "github.com/docker/docker/daemon/graphdriver/devmapper" diff --git a/daemon/graphdriver/devmapper/driver.go b/daemon/graphdriver/devmapper/driver.go index 2cc1bdfa33..d6e172cf6e 100644 --- a/daemon/graphdriver/devmapper/driver.go +++ b/daemon/graphdriver/devmapper/driver.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package devmapper // import "github.com/docker/docker/daemon/graphdriver/devmapper" diff --git a/daemon/graphdriver/devmapper/mount.go b/daemon/graphdriver/devmapper/mount.go index 78d05b0792..724f64cd2b 100644 --- a/daemon/graphdriver/devmapper/mount.go +++ b/daemon/graphdriver/devmapper/mount.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package devmapper // import "github.com/docker/docker/daemon/graphdriver/devmapper" diff --git a/daemon/graphdriver/driver_unsupported.go b/daemon/graphdriver/driver_unsupported.go index 1f2e8f071b..60aea63b9c 100644 --- a/daemon/graphdriver/driver_unsupported.go +++ b/daemon/graphdriver/driver_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows && !freebsd // +build !linux,!windows,!freebsd package graphdriver // import "github.com/docker/docker/daemon/graphdriver" diff --git a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go index 8aab5cf922..1c236f9213 100644 --- a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go +++ b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package fuseoverlayfs // import "github.com/docker/docker/daemon/graphdriver/fuse-overlayfs" diff --git a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_test.go b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_test.go index f3e6e458ea..0d5b29e538 100644 --- a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_test.go +++ b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package fuseoverlayfs // import "github.com/docker/docker/daemon/graphdriver/fuse-overlayfs" diff --git a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_unsupported.go b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_unsupported.go index a5a1684421..1b115345e9 100644 --- a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_unsupported.go +++ b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package fuseoverlayfs // import "github.com/docker/docker/daemon/graphdriver/fuse-overlayfs" diff --git a/daemon/graphdriver/graphtest/graphbench_unix.go b/daemon/graphdriver/graphtest/graphbench_unix.go index 60db16de67..bd677054bc 100644 --- a/daemon/graphdriver/graphtest/graphbench_unix.go +++ b/daemon/graphdriver/graphtest/graphbench_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package graphtest // import "github.com/docker/docker/daemon/graphdriver/graphtest" diff --git a/daemon/graphdriver/graphtest/graphtest_unix.go b/daemon/graphdriver/graphtest/graphtest_unix.go index 4073e0b7a0..76cb6b9c12 100644 --- a/daemon/graphdriver/graphtest/graphtest_unix.go +++ b/daemon/graphdriver/graphtest/graphtest_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package graphtest // import "github.com/docker/docker/daemon/graphdriver/graphtest" diff --git a/daemon/graphdriver/graphtest/testutil_unix.go b/daemon/graphdriver/graphtest/testutil_unix.go index d5788f5525..1c3037c8aa 100644 --- a/daemon/graphdriver/graphtest/testutil_unix.go +++ b/daemon/graphdriver/graphtest/testutil_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package graphtest // import "github.com/docker/docker/daemon/graphdriver/graphtest" diff --git a/daemon/graphdriver/lcow/lcow.go b/daemon/graphdriver/lcow/lcow.go index 1bf48fed2a..9e94bb228d 100644 --- a/daemon/graphdriver/lcow/lcow.go +++ b/daemon/graphdriver/lcow/lcow.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows // Locale: en-gb diff --git a/daemon/graphdriver/lcow/lcow_svm.go b/daemon/graphdriver/lcow/lcow_svm.go index a70e1b2486..67c82c783f 100644 --- a/daemon/graphdriver/lcow/lcow_svm.go +++ b/daemon/graphdriver/lcow/lcow_svm.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package lcow // import "github.com/docker/docker/daemon/graphdriver/lcow" diff --git a/daemon/graphdriver/lcow/remotefs.go b/daemon/graphdriver/lcow/remotefs.go index 29f15fd24c..b0e89329cd 100644 --- a/daemon/graphdriver/lcow/remotefs.go +++ b/daemon/graphdriver/lcow/remotefs.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package lcow // import "github.com/docker/docker/daemon/graphdriver/lcow" diff --git a/daemon/graphdriver/lcow/remotefs_file.go b/daemon/graphdriver/lcow/remotefs_file.go index 1f00bfff46..e9bc94f445 100644 --- a/daemon/graphdriver/lcow/remotefs_file.go +++ b/daemon/graphdriver/lcow/remotefs_file.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package lcow // import "github.com/docker/docker/daemon/graphdriver/lcow" diff --git a/daemon/graphdriver/lcow/remotefs_filedriver.go b/daemon/graphdriver/lcow/remotefs_filedriver.go index f335868af6..229ab98645 100644 --- a/daemon/graphdriver/lcow/remotefs_filedriver.go +++ b/daemon/graphdriver/lcow/remotefs_filedriver.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package lcow // import "github.com/docker/docker/daemon/graphdriver/lcow" diff --git a/daemon/graphdriver/lcow/remotefs_pathdriver.go b/daemon/graphdriver/lcow/remotefs_pathdriver.go index 74895b0465..5f89dabef5 100644 --- a/daemon/graphdriver/lcow/remotefs_pathdriver.go +++ b/daemon/graphdriver/lcow/remotefs_pathdriver.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package lcow // import "github.com/docker/docker/daemon/graphdriver/lcow" diff --git a/daemon/graphdriver/overlay/overlay.go b/daemon/graphdriver/overlay/overlay.go index 6e9897da05..99ba139f62 100644 --- a/daemon/graphdriver/overlay/overlay.go +++ b/daemon/graphdriver/overlay/overlay.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay // import "github.com/docker/docker/daemon/graphdriver/overlay" diff --git a/daemon/graphdriver/overlay/overlay_test.go b/daemon/graphdriver/overlay/overlay_test.go index b270122c63..414d5f97c4 100644 --- a/daemon/graphdriver/overlay/overlay_test.go +++ b/daemon/graphdriver/overlay/overlay_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay // import "github.com/docker/docker/daemon/graphdriver/overlay" diff --git a/daemon/graphdriver/overlay/overlay_unsupported.go b/daemon/graphdriver/overlay/overlay_unsupported.go index 8fc06ffecf..73128b58cd 100644 --- a/daemon/graphdriver/overlay/overlay_unsupported.go +++ b/daemon/graphdriver/overlay/overlay_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package overlay // import "github.com/docker/docker/daemon/graphdriver/overlay" diff --git a/daemon/graphdriver/overlay2/check.go b/daemon/graphdriver/overlay2/check.go index 9641ed47ec..37db8b3ef3 100644 --- a/daemon/graphdriver/overlay2/check.go +++ b/daemon/graphdriver/overlay2/check.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" diff --git a/daemon/graphdriver/overlay2/mount.go b/daemon/graphdriver/overlay2/mount.go index de573deba1..dcd7c01490 100644 --- a/daemon/graphdriver/overlay2/mount.go +++ b/daemon/graphdriver/overlay2/mount.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" diff --git a/daemon/graphdriver/overlay2/overlay.go b/daemon/graphdriver/overlay2/overlay.go index 562d1e58fd..57b1bed888 100644 --- a/daemon/graphdriver/overlay2/overlay.go +++ b/daemon/graphdriver/overlay2/overlay.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" diff --git a/daemon/graphdriver/overlay2/overlay_test.go b/daemon/graphdriver/overlay2/overlay_test.go index 6befa7db57..261ee40005 100644 --- a/daemon/graphdriver/overlay2/overlay_test.go +++ b/daemon/graphdriver/overlay2/overlay_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" diff --git a/daemon/graphdriver/overlay2/overlay_unsupported.go b/daemon/graphdriver/overlay2/overlay_unsupported.go index 68b75a366a..e34c13df60 100644 --- a/daemon/graphdriver/overlay2/overlay_unsupported.go +++ b/daemon/graphdriver/overlay2/overlay_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" diff --git a/daemon/graphdriver/overlayutils/overlayutils.go b/daemon/graphdriver/overlayutils/overlayutils.go index 09d3b17fb3..26652d2fc2 100644 --- a/daemon/graphdriver/overlayutils/overlayutils.go +++ b/daemon/graphdriver/overlayutils/overlayutils.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlayutils // import "github.com/docker/docker/daemon/graphdriver/overlayutils" diff --git a/daemon/graphdriver/overlayutils/randomid.go b/daemon/graphdriver/overlayutils/randomid.go index 2590443b5e..2c6706b388 100644 --- a/daemon/graphdriver/overlayutils/randomid.go +++ b/daemon/graphdriver/overlayutils/randomid.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlayutils // import "github.com/docker/docker/daemon/graphdriver/overlayutils" diff --git a/daemon/graphdriver/overlayutils/userxattr.go b/daemon/graphdriver/overlayutils/userxattr.go index 7f19dcb7ed..e516617b6b 100644 --- a/daemon/graphdriver/overlayutils/userxattr.go +++ b/daemon/graphdriver/overlayutils/userxattr.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux // Forked from https://github.com/containerd/containerd/blob/9ade247b38b5a685244e1391c86ff41ab109556e/snapshots/overlay/check.go diff --git a/daemon/graphdriver/register/register_aufs.go b/daemon/graphdriver/register/register_aufs.go index ec18d1d377..4c028f72ef 100644 --- a/daemon/graphdriver/register/register_aufs.go +++ b/daemon/graphdriver/register/register_aufs.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_aufs && linux // +build !exclude_graphdriver_aufs,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_btrfs.go b/daemon/graphdriver/register/register_btrfs.go index 2f8c67056b..5167f8553d 100644 --- a/daemon/graphdriver/register/register_btrfs.go +++ b/daemon/graphdriver/register/register_btrfs.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_btrfs && linux // +build !exclude_graphdriver_btrfs,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_devicemapper.go b/daemon/graphdriver/register/register_devicemapper.go index ccbb8bfabe..ce16e36cca 100644 --- a/daemon/graphdriver/register/register_devicemapper.go +++ b/daemon/graphdriver/register/register_devicemapper.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_devicemapper && !static_build && linux // +build !exclude_graphdriver_devicemapper,!static_build,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_fuseoverlayfs.go b/daemon/graphdriver/register/register_fuseoverlayfs.go index 0e7ef92a2d..c4ebdf2628 100644 --- a/daemon/graphdriver/register/register_fuseoverlayfs.go +++ b/daemon/graphdriver/register/register_fuseoverlayfs.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_fuseoverlayfs && linux // +build !exclude_graphdriver_fuseoverlayfs,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_overlay.go b/daemon/graphdriver/register/register_overlay.go index a2e384d548..9b6c8c36db 100644 --- a/daemon/graphdriver/register/register_overlay.go +++ b/daemon/graphdriver/register/register_overlay.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_overlay && linux // +build !exclude_graphdriver_overlay,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_overlay2.go b/daemon/graphdriver/register/register_overlay2.go index bcd2cee20e..53233c5009 100644 --- a/daemon/graphdriver/register/register_overlay2.go +++ b/daemon/graphdriver/register/register_overlay2.go @@ -1,3 +1,4 @@ +//go:build !exclude_graphdriver_overlay2 && linux // +build !exclude_graphdriver_overlay2,linux package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/register/register_zfs.go b/daemon/graphdriver/register/register_zfs.go index b137ad25b7..2632864b4e 100644 --- a/daemon/graphdriver/register/register_zfs.go +++ b/daemon/graphdriver/register/register_zfs.go @@ -1,3 +1,4 @@ +//go:build (!exclude_graphdriver_zfs && linux) || (!exclude_graphdriver_zfs && freebsd) // +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd package register // import "github.com/docker/docker/daemon/graphdriver/register" diff --git a/daemon/graphdriver/vfs/copy_unsupported.go b/daemon/graphdriver/vfs/copy_unsupported.go index 894ff02f02..1b0185fedb 100644 --- a/daemon/graphdriver/vfs/copy_unsupported.go +++ b/daemon/graphdriver/vfs/copy_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package vfs // import "github.com/docker/docker/daemon/graphdriver/vfs" diff --git a/daemon/graphdriver/vfs/quota_unsupported.go b/daemon/graphdriver/vfs/quota_unsupported.go index 06ebf8aee8..ecd16ebdda 100644 --- a/daemon/graphdriver/vfs/quota_unsupported.go +++ b/daemon/graphdriver/vfs/quota_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package vfs // import "github.com/docker/docker/daemon/graphdriver/vfs" diff --git a/daemon/graphdriver/vfs/vfs_test.go b/daemon/graphdriver/vfs/vfs_test.go index 7c59ec32e2..63db564518 100644 --- a/daemon/graphdriver/vfs/vfs_test.go +++ b/daemon/graphdriver/vfs/vfs_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package vfs // import "github.com/docker/docker/daemon/graphdriver/vfs" diff --git a/daemon/graphdriver/windows/windows.go b/daemon/graphdriver/windows/windows.go index a5f614dfae..f87c2703cb 100644 --- a/daemon/graphdriver/windows/windows.go +++ b/daemon/graphdriver/windows/windows.go @@ -1,4 +1,5 @@ -//+build windows +//go:build windows +// +build windows package windows // import "github.com/docker/docker/daemon/graphdriver/windows" diff --git a/daemon/graphdriver/zfs/zfs.go b/daemon/graphdriver/zfs/zfs.go index 2fbbe9498f..90c080a228 100644 --- a/daemon/graphdriver/zfs/zfs.go +++ b/daemon/graphdriver/zfs/zfs.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package zfs // import "github.com/docker/docker/daemon/graphdriver/zfs" diff --git a/daemon/graphdriver/zfs/zfs_test.go b/daemon/graphdriver/zfs/zfs_test.go index b5d6cb18c7..f8bcdaf524 100644 --- a/daemon/graphdriver/zfs/zfs_test.go +++ b/daemon/graphdriver/zfs/zfs_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package zfs // import "github.com/docker/docker/daemon/graphdriver/zfs" diff --git a/daemon/graphdriver/zfs/zfs_unsupported.go b/daemon/graphdriver/zfs/zfs_unsupported.go index 1b77030684..a1eda73e69 100644 --- a/daemon/graphdriver/zfs/zfs_unsupported.go +++ b/daemon/graphdriver/zfs/zfs_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !freebsd // +build !linux,!freebsd package zfs // import "github.com/docker/docker/daemon/graphdriver/zfs" diff --git a/daemon/images/image_unix.go b/daemon/images/image_unix.go index 3f577271a2..71b4904f51 100644 --- a/daemon/images/image_unix.go +++ b/daemon/images/image_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package images // import "github.com/docker/docker/daemon/images" diff --git a/daemon/info_unix.go b/daemon/info_unix.go index 42a81fe8c8..be554844d0 100644 --- a/daemon/info_unix.go +++ b/daemon/info_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/info_unix_test.go b/daemon/info_unix_test.go index 642b38fa7e..4dfe6e4efa 100644 --- a/daemon/info_unix_test.go +++ b/daemon/info_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/initlayer/setup_unix.go b/daemon/initlayer/setup_unix.go index 4af7eafc67..1a971897b4 100644 --- a/daemon/initlayer/setup_unix.go +++ b/daemon/initlayer/setup_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package initlayer // import "github.com/docker/docker/daemon/initlayer" diff --git a/daemon/keys.go b/daemon/keys.go index 946eaaab1c..6cbc54ed7a 100644 --- a/daemon/keys.go +++ b/daemon/keys.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/keys_unsupported.go b/daemon/keys_unsupported.go index 2ccdb576d7..838b23868c 100644 --- a/daemon/keys_unsupported.go +++ b/daemon/keys_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/list_unix.go b/daemon/list_unix.go index 4f9e453bc2..af86834a10 100644 --- a/daemon/list_unix.go +++ b/daemon/list_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/listeners/group_unix.go b/daemon/listeners/group_unix.go index 68c0791982..546871ed87 100644 --- a/daemon/listeners/group_unix.go +++ b/daemon/listeners/group_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package listeners // import "github.com/docker/docker/daemon/listeners" diff --git a/daemon/logger/gcplogs/gcplogging_others.go b/daemon/logger/gcplogs/gcplogging_others.go index 10a2cdc8cd..55f43b0c0c 100644 --- a/daemon/logger/gcplogs/gcplogging_others.go +++ b/daemon/logger/gcplogs/gcplogging_others.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package gcplogs // import "github.com/docker/docker/daemon/logger/gcplogs" diff --git a/daemon/logger/gelf/gelf_test.go b/daemon/logger/gelf/gelf_test.go index 4ba7d1d545..2b6e5f0f82 100644 --- a/daemon/logger/gelf/gelf_test.go +++ b/daemon/logger/gelf/gelf_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package gelf // import "github.com/docker/docker/daemon/logger/gelf" diff --git a/daemon/logger/journald/journald.go b/daemon/logger/journald/journald.go index 382c552e55..e809ca722c 100644 --- a/daemon/logger/journald/journald.go +++ b/daemon/logger/journald/journald.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux // Package journald provides the log driver for forwarding server logs diff --git a/daemon/logger/journald/journald_test.go b/daemon/logger/journald/journald_test.go index bd7bf7a3b3..385e1db93d 100644 --- a/daemon/logger/journald/journald_test.go +++ b/daemon/logger/journald/journald_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/journald/journald_unsupported.go b/daemon/logger/journald/journald_unsupported.go index 7899fc1214..2dddc9e053 100644 --- a/daemon/logger/journald/journald_unsupported.go +++ b/daemon/logger/journald/journald_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/journald/read.go b/daemon/logger/journald/read.go index d2bd112d27..2d4cbc859c 100644 --- a/daemon/logger/journald/read.go +++ b/daemon/logger/journald/read.go @@ -1,3 +1,4 @@ +//go:build linux && cgo && !static_build && journald // +build linux,cgo,!static_build,journald package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/journald/read_native.go b/daemon/logger/journald/read_native.go index ab68cf4ba7..ce1de3fbde 100644 --- a/daemon/logger/journald/read_native.go +++ b/daemon/logger/journald/read_native.go @@ -1,3 +1,4 @@ +//go:build linux && cgo && !static_build && journald && !journald_compat // +build linux,cgo,!static_build,journald,!journald_compat package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/journald/read_native_compat.go b/daemon/logger/journald/read_native_compat.go index 4806e130ef..9876591131 100644 --- a/daemon/logger/journald/read_native_compat.go +++ b/daemon/logger/journald/read_native_compat.go @@ -1,3 +1,4 @@ +//go:build linux && cgo && !static_build && journald && journald_compat // +build linux,cgo,!static_build,journald,journald_compat package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/journald/read_unsupported.go b/daemon/logger/journald/read_unsupported.go index a66b666659..199d7683a6 100644 --- a/daemon/logger/journald/read_unsupported.go +++ b/daemon/logger/journald/read_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux || !cgo || static_build || !journald // +build !linux !cgo static_build !journald package journald // import "github.com/docker/docker/daemon/logger/journald" diff --git a/daemon/logger/loggerutils/file_unix.go b/daemon/logger/loggerutils/file_unix.go index e7b6095296..1d2553c280 100644 --- a/daemon/logger/loggerutils/file_unix.go +++ b/daemon/logger/loggerutils/file_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package loggerutils diff --git a/daemon/logger/plugin_unix.go b/daemon/logger/plugin_unix.go index e9a16af9b1..a59fda860a 100644 --- a/daemon/logger/plugin_unix.go +++ b/daemon/logger/plugin_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package logger // import "github.com/docker/docker/daemon/logger" diff --git a/daemon/logger/plugin_unsupported.go b/daemon/logger/plugin_unsupported.go index 2ad47cc077..fbbeba0c21 100644 --- a/daemon/logger/plugin_unsupported.go +++ b/daemon/logger/plugin_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !freebsd // +build !linux,!freebsd package logger // import "github.com/docker/docker/daemon/logger" diff --git a/daemon/metrics_unix.go b/daemon/metrics_unix.go index e8bcd88b15..7869712541 100644 --- a/daemon/metrics_unix.go +++ b/daemon/metrics_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/metrics_unsupported.go b/daemon/metrics_unsupported.go index 653c77fc32..2a25b73d94 100644 --- a/daemon/metrics_unsupported.go +++ b/daemon/metrics_unsupported.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/network/filter_test.go b/daemon/network/filter_test.go index 042f5d1788..40634f80e1 100644 --- a/daemon/network/filter_test.go +++ b/daemon/network/filter_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package network // import "github.com/docker/docker/daemon/network" diff --git a/daemon/reload_unix.go b/daemon/reload_unix.go index 02ae20a1cd..77d7e91ede 100644 --- a/daemon/reload_unix.go +++ b/daemon/reload_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/resize_test.go b/daemon/resize_test.go index 595feb15cc..50a96778a7 100644 --- a/daemon/resize_test.go +++ b/daemon/resize_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon diff --git a/daemon/runtime_unix.go b/daemon/runtime_unix.go index 6c57e2455b..c5903cbcf7 100644 --- a/daemon/runtime_unix.go +++ b/daemon/runtime_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon diff --git a/daemon/seccomp_disabled.go b/daemon/seccomp_disabled.go index fff9cbe4c6..c1c0216bd3 100644 --- a/daemon/seccomp_disabled.go +++ b/daemon/seccomp_disabled.go @@ -1,3 +1,4 @@ +//go:build linux && !seccomp // +build linux,!seccomp package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/seccomp_linux.go b/daemon/seccomp_linux.go index 7fa1a490de..60d2b0c2d1 100644 --- a/daemon/seccomp_linux.go +++ b/daemon/seccomp_linux.go @@ -1,3 +1,4 @@ +//go:build linux && seccomp // +build linux,seccomp package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/seccomp_unsupported.go b/daemon/seccomp_unsupported.go index dba8763c88..97fe70b30a 100644 --- a/daemon/seccomp_unsupported.go +++ b/daemon/seccomp_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/secrets_unsupported.go b/daemon/secrets_unsupported.go index edad69c569..678b7c34c0 100644 --- a/daemon/secrets_unsupported.go +++ b/daemon/secrets_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/start_unix.go b/daemon/start_unix.go index 2b4dc95106..2f66c00105 100644 --- a/daemon/start_unix.go +++ b/daemon/start_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/stats/collector_unix.go b/daemon/stats/collector_unix.go index d36454d384..215fe26e46 100644 --- a/daemon/stats/collector_unix.go +++ b/daemon/stats/collector_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package stats // import "github.com/docker/docker/daemon/stats" diff --git a/daemon/stats_unix.go b/daemon/stats_unix.go index ee78ca688b..0afc953266 100644 --- a/daemon/stats_unix.go +++ b/daemon/stats_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/top_unix.go b/daemon/top_unix.go index 570cdce2eb..08edb3020e 100644 --- a/daemon/top_unix.go +++ b/daemon/top_unix.go @@ -1,4 +1,5 @@ -//+build !windows +//go:build !windows +// +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/top_unix_test.go b/daemon/top_unix_test.go index 6e60924daf..a663323b67 100644 --- a/daemon/top_unix_test.go +++ b/daemon/top_unix_test.go @@ -1,4 +1,5 @@ -//+build !windows +//go:build !windows +// +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/util_test.go b/daemon/util_test.go index 05cf1dd344..64a28be865 100644 --- a/daemon/util_test.go +++ b/daemon/util_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package daemon diff --git a/daemon/volumes_unix.go b/daemon/volumes_unix.go index 758070fd11..59a95c239a 100644 --- a/daemon/volumes_unix.go +++ b/daemon/volumes_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/daemon/volumes_unix_test.go b/daemon/volumes_unix_test.go index 36e19110d1..4515dfb49f 100644 --- a/daemon/volumes_unix_test.go +++ b/daemon/volumes_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/daemon" diff --git a/distribution/pull_v2_unix.go b/distribution/pull_v2_unix.go index fea1eb6e66..e922292883 100644 --- a/distribution/pull_v2_unix.go +++ b/distribution/pull_v2_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package distribution // import "github.com/docker/docker/distribution" diff --git a/dockerversion/version_lib.go b/dockerversion/version_lib.go index a42eafcef8..96954560cd 100644 --- a/dockerversion/version_lib.go +++ b/dockerversion/version_lib.go @@ -1,3 +1,4 @@ +//go:build !autogen // +build !autogen // Package dockerversion is auto-generated at build-time diff --git a/integration-cli/docker_api_build_windows_test.go b/integration-cli/docker_api_build_windows_test.go index 2eb62ddb1b..68e19ca036 100644 --- a/integration-cli/docker_api_build_windows_test.go +++ b/integration-cli/docker_api_build_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package main diff --git a/integration-cli/docker_api_containers_unix_test.go b/integration-cli/docker_api_containers_unix_test.go index 05c667fa69..be0eb1eb4b 100644 --- a/integration-cli/docker_api_containers_unix_test.go +++ b/integration-cli/docker_api_containers_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_api_containers_windows_test.go b/integration-cli/docker_api_containers_windows_test.go index 1038506bee..f1891ebe4e 100644 --- a/integration-cli/docker_api_containers_windows_test.go +++ b/integration-cli/docker_api_containers_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package main diff --git a/integration-cli/docker_api_swarm_node_test.go b/integration-cli/docker_api_swarm_node_test.go index ab5882dbf4..e883a44d07 100644 --- a/integration-cli/docker_api_swarm_node_test.go +++ b/integration-cli/docker_api_swarm_node_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_api_swarm_service_test.go b/integration-cli/docker_api_swarm_service_test.go index 5e522b58cd..1bba494e69 100644 --- a/integration-cli/docker_api_swarm_service_test.go +++ b/integration-cli/docker_api_swarm_service_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_api_swarm_test.go b/integration-cli/docker_api_swarm_test.go index e818b58e04..b374b9c4ce 100644 --- a/integration-cli/docker_api_swarm_test.go +++ b/integration-cli/docker_api_swarm_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_attach_unix_test.go b/integration-cli/docker_cli_attach_unix_test.go index bf3fa4c316..ca51d8ce29 100644 --- a/integration-cli/docker_cli_attach_unix_test.go +++ b/integration-cli/docker_cli_attach_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_build_unix_test.go b/integration-cli/docker_cli_build_unix_test.go index ed89099750..31ead25bc6 100644 --- a/integration-cli/docker_cli_build_unix_test.go +++ b/integration-cli/docker_cli_build_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_cp_to_container_unix_test.go b/integration-cli/docker_cli_cp_to_container_unix_test.go index c591588f82..80e668c2ec 100644 --- a/integration-cli/docker_cli_cp_to_container_unix_test.go +++ b/integration-cli/docker_cli_cp_to_container_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_daemon_plugins_test.go b/integration-cli/docker_cli_daemon_plugins_test.go index 3c16498917..55695b455a 100644 --- a/integration-cli/docker_cli_daemon_plugins_test.go +++ b/integration-cli/docker_cli_daemon_plugins_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package main diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 378b479dc8..bec24050da 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package main diff --git a/integration-cli/docker_cli_events_unix_test.go b/integration-cli/docker_cli_events_unix_test.go index b824b2f9db..3bb7b6539f 100644 --- a/integration-cli/docker_cli_events_unix_test.go +++ b/integration-cli/docker_cli_events_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_exec_unix_test.go b/integration-cli/docker_cli_exec_unix_test.go index deee516232..f83b2aad1c 100644 --- a/integration-cli/docker_cli_exec_unix_test.go +++ b/integration-cli/docker_cli_exec_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_info_unix_test.go b/integration-cli/docker_cli_info_unix_test.go index 21c5a5eb5d..1b013251c9 100644 --- a/integration-cli/docker_cli_info_unix_test.go +++ b/integration-cli/docker_cli_info_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index e52c1b409a..2bf38036ac 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_prune_unix_test.go b/integration-cli/docker_cli_prune_unix_test.go index 8198d24c9e..c663938b47 100644 --- a/integration-cli/docker_cli_prune_unix_test.go +++ b/integration-cli/docker_cli_prune_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_run_unix_test.go b/integration-cli/docker_cli_run_unix_test.go index e0003396d9..6f14c502aa 100644 --- a/integration-cli/docker_cli_run_unix_test.go +++ b/integration-cli/docker_cli_run_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go index 615334db5b..0554fbe49f 100644 --- a/integration-cli/docker_cli_save_load_unix_test.go +++ b/integration-cli/docker_cli_save_load_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_service_create_test.go b/integration-cli/docker_cli_service_create_test.go index d36b2da8d6..6d4dc3a375 100644 --- a/integration-cli/docker_cli_service_create_test.go +++ b/integration-cli/docker_cli_service_create_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_service_health_test.go b/integration-cli/docker_cli_service_health_test.go index dd2d94eb24..0caab32ea5 100644 --- a/integration-cli/docker_cli_service_health_test.go +++ b/integration-cli/docker_cli_service_health_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_service_logs_test.go b/integration-cli/docker_cli_service_logs_test.go index 2680abf6c6..7727e1fe2a 100644 --- a/integration-cli/docker_cli_service_logs_test.go +++ b/integration-cli/docker_cli_service_logs_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_service_scale_test.go b/integration-cli/docker_cli_service_scale_test.go index 1d01cc4a85..40afcc2a8f 100644 --- a/integration-cli/docker_cli_service_scale_test.go +++ b/integration-cli/docker_cli_service_scale_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go index f95199a02e..60355d7bed 100644 --- a/integration-cli/docker_cli_swarm_test.go +++ b/integration-cli/docker_cli_swarm_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_swarm_unix_test.go b/integration-cli/docker_cli_swarm_unix_test.go index 47ff925cd5..35f61a55f0 100644 --- a/integration-cli/docker_cli_swarm_unix_test.go +++ b/integration-cli/docker_cli_swarm_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_update_unix_test.go b/integration-cli/docker_cli_update_unix_test.go index 53621b63c2..459b70e646 100644 --- a/integration-cli/docker_cli_update_unix_test.go +++ b/integration-cli/docker_cli_update_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_cli_userns_test.go b/integration-cli/docker_cli_userns_test.go index 3fac4d7ced..7084f0e836 100644 --- a/integration-cli/docker_cli_userns_test.go +++ b/integration-cli/docker_cli_userns_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/docker_deprecated_api_v124_unix_test.go b/integration-cli/docker_deprecated_api_v124_unix_test.go index 7bf7de44ea..f8665f58b1 100644 --- a/integration-cli/docker_deprecated_api_v124_unix_test.go +++ b/integration-cli/docker_deprecated_api_v124_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/requirements_unix_test.go b/integration-cli/requirements_unix_test.go index 8c75b26424..7a22eea7e6 100644 --- a/integration-cli/requirements_unix_test.go +++ b/integration-cli/requirements_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/test_vars_noseccomp_test.go b/integration-cli/test_vars_noseccomp_test.go index 2f47ab07a0..79c7f3bb6e 100644 --- a/integration-cli/test_vars_noseccomp_test.go +++ b/integration-cli/test_vars_noseccomp_test.go @@ -1,3 +1,4 @@ +//go:build !seccomp // +build !seccomp package main diff --git a/integration-cli/test_vars_seccomp_test.go b/integration-cli/test_vars_seccomp_test.go index 00cf697209..0c16cf4ae8 100644 --- a/integration-cli/test_vars_seccomp_test.go +++ b/integration-cli/test_vars_seccomp_test.go @@ -1,3 +1,4 @@ +//go:build seccomp // +build seccomp package main diff --git a/integration-cli/test_vars_unix_test.go b/integration-cli/test_vars_unix_test.go index 1ab8a5ca48..57666fc143 100644 --- a/integration-cli/test_vars_unix_test.go +++ b/integration-cli/test_vars_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main diff --git a/integration-cli/test_vars_windows_test.go b/integration-cli/test_vars_windows_test.go index f81ac53cc3..c2d892f625 100644 --- a/integration-cli/test_vars_windows_test.go +++ b/integration-cli/test_vars_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package main diff --git a/integration/image/remove_unix_test.go b/integration/image/remove_unix_test.go index f1815bb330..b548275e7b 100644 --- a/integration/image/remove_unix_test.go +++ b/integration/image/remove_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package image // import "github.com/docker/docker/integration/image" diff --git a/integration/internal/requirement/requirement_windows.go b/integration/internal/requirement/requirement_windows.go index 975aa77c73..7abcaa2990 100644 --- a/integration/internal/requirement/requirement_windows.go +++ b/integration/internal/requirement/requirement_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package requirement // import "github.com/docker/docker/integration/internal/requirement" diff --git a/integration/network/helpers.go b/integration/network/helpers.go index e7b087d9cd..1b3e6c5e49 100644 --- a/integration/network/helpers.go +++ b/integration/network/helpers.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package network diff --git a/integration/network/ipvlan/ipvlan_test.go b/integration/network/ipvlan/ipvlan_test.go index 008bcad563..969772fe96 100644 --- a/integration/network/ipvlan/ipvlan_test.go +++ b/integration/network/ipvlan/ipvlan_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package ipvlan // import "github.com/docker/docker/integration/network/ipvlan" diff --git a/integration/network/ipvlan/main_test.go b/integration/network/ipvlan/main_test.go index c235396da0..470a75a90f 100644 --- a/integration/network/ipvlan/main_test.go +++ b/integration/network/ipvlan/main_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package ipvlan // import "github.com/docker/docker/integration/network/ipvlan" diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index bdf1c71c6b..d7dae5c86e 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package macvlan // import "github.com/docker/docker/integration/network/macvlan" diff --git a/integration/network/macvlan/main_test.go b/integration/network/macvlan/main_test.go index c18ef7b12e..c7adc4f907 100644 --- a/integration/network/macvlan/main_test.go +++ b/integration/network/macvlan/main_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package macvlan // import "github.com/docker/docker/integration/network/macvlan" diff --git a/integration/plugin/authz/authz_plugin_test.go b/integration/plugin/authz/authz_plugin_test.go index 2ae52f3965..6cce66cd6c 100644 --- a/integration/plugin/authz/authz_plugin_test.go +++ b/integration/plugin/authz/authz_plugin_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package authz // import "github.com/docker/docker/integration/plugin/authz" diff --git a/integration/plugin/authz/authz_plugin_v2_test.go b/integration/plugin/authz/authz_plugin_v2_test.go index b72552ac4f..f567f5a448 100644 --- a/integration/plugin/authz/authz_plugin_v2_test.go +++ b/integration/plugin/authz/authz_plugin_v2_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package authz // import "github.com/docker/docker/integration/plugin/authz" diff --git a/integration/plugin/authz/main_test.go b/integration/plugin/authz/main_test.go index ec02c09fd9..ff39d61372 100644 --- a/integration/plugin/authz/main_test.go +++ b/integration/plugin/authz/main_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package authz // import "github.com/docker/docker/integration/plugin/authz" diff --git a/integration/plugin/logging/validation_test.go b/integration/plugin/logging/validation_test.go index 8a59b65474..9a0a46350d 100644 --- a/integration/plugin/logging/validation_test.go +++ b/integration/plugin/logging/validation_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package logging diff --git a/integration/system/info_linux_test.go b/integration/system/info_linux_test.go index 36641a573c..87e691f526 100644 --- a/integration/system/info_linux_test.go +++ b/integration/system/info_linux_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/integration/system" diff --git a/layer/filestore_unix.go b/layer/filestore_unix.go index 68e7f90779..88a2a85595 100644 --- a/layer/filestore_unix.go +++ b/layer/filestore_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package layer // import "github.com/docker/docker/layer" diff --git a/layer/layer_unix.go b/layer/layer_unix.go index 002c7ff838..24cb880092 100644 --- a/layer/layer_unix.go +++ b/layer/layer_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin || openbsd // +build linux freebsd darwin openbsd package layer // import "github.com/docker/docker/layer" diff --git a/layer/layer_unix_test.go b/layer/layer_unix_test.go index 6830158131..c3e4bdaf6b 100644 --- a/layer/layer_unix_test.go +++ b/layer/layer_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package layer // import "github.com/docker/docker/layer" diff --git a/oci/devices_unsupported.go b/oci/devices_unsupported.go index af6dd3bda2..1f6468e944 100644 --- a/oci/devices_unsupported.go +++ b/oci/devices_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package oci // import "github.com/docker/docker/oci" diff --git a/oci/seccomp_test.go b/oci/seccomp_test.go index 3fc808d814..2efbd1c3e0 100644 --- a/oci/seccomp_test.go +++ b/oci/seccomp_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package oci diff --git a/opts/hosts_unix.go b/opts/hosts_unix.go index 29864194ac..4b1c8512e2 100644 --- a/opts/hosts_unix.go +++ b/opts/hosts_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package opts // import "github.com/docker/docker/opts" diff --git a/pkg/archive/archive_other.go b/pkg/archive/archive_other.go index 2a3dc95398..28ae2769c5 100644 --- a/pkg/archive/archive_other.go +++ b/pkg/archive/archive_other.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/archive_unix.go b/pkg/archive/archive_unix.go index 0b92bb0f4a..1eb0b74c35 100644 --- a/pkg/archive/archive_unix.go +++ b/pkg/archive/archive_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/archive_unix_test.go b/pkg/archive/archive_unix_test.go index 6274744b61..db2be15002 100644 --- a/pkg/archive/archive_unix_test.go +++ b/pkg/archive/archive_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/archive_windows_test.go b/pkg/archive/archive_windows_test.go index 6f0e25ccac..c263290b0f 100644 --- a/pkg/archive/archive_windows_test.go +++ b/pkg/archive/archive_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/changes_other.go b/pkg/archive/changes_other.go index ba744741cd..0e4399a43b 100644 --- a/pkg/archive/changes_other.go +++ b/pkg/archive/changes_other.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/changes_unix.go b/pkg/archive/changes_unix.go index 06217b7161..54aace970e 100644 --- a/pkg/archive/changes_unix.go +++ b/pkg/archive/changes_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/copy_unix.go b/pkg/archive/copy_unix.go index 3958364f5b..2ac7729f4c 100644 --- a/pkg/archive/copy_unix.go +++ b/pkg/archive/copy_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/archive/copy_unix_test.go b/pkg/archive/copy_unix_test.go index 7523f5c21d..7c32062619 100644 --- a/pkg/archive/copy_unix_test.go +++ b/pkg/archive/copy_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // TODO Windows: Some of these tests may be salvageable and portable to Windows. diff --git a/pkg/archive/example_changes.go b/pkg/archive/example_changes.go index 495db809e9..48f270aaf8 100644 --- a/pkg/archive/example_changes.go +++ b/pkg/archive/example_changes.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore // Simple tool to create an archive stream from an old and new directory diff --git a/pkg/archive/time_unsupported.go b/pkg/archive/time_unsupported.go index f58bf227fd..d087796861 100644 --- a/pkg/archive/time_unsupported.go +++ b/pkg/archive/time_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package archive // import "github.com/docker/docker/pkg/archive" diff --git a/pkg/authorization/authz_unix_test.go b/pkg/authorization/authz_unix_test.go index 9b4898643e..553eab0cb5 100644 --- a/pkg/authorization/authz_unix_test.go +++ b/pkg/authorization/authz_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // TODO Windows: This uses a Unix socket for testing. This might be possible diff --git a/pkg/authorization/middleware_unix_test.go b/pkg/authorization/middleware_unix_test.go index 468cb594d4..2587f9dc2a 100644 --- a/pkg/authorization/middleware_unix_test.go +++ b/pkg/authorization/middleware_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package authorization // import "github.com/docker/docker/pkg/authorization" diff --git a/pkg/chrootarchive/archive_unix.go b/pkg/chrootarchive/archive_unix.go index 864c3ac6dc..e292dd576d 100644 --- a/pkg/chrootarchive/archive_unix.go +++ b/pkg/chrootarchive/archive_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" diff --git a/pkg/chrootarchive/archive_unix_test.go b/pkg/chrootarchive/archive_unix_test.go index f9bf815ec8..a0ee4b0431 100644 --- a/pkg/chrootarchive/archive_unix_test.go +++ b/pkg/chrootarchive/archive_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package chrootarchive diff --git a/pkg/chrootarchive/chroot_unix.go b/pkg/chrootarchive/chroot_unix.go index 8003136f50..c35aa91669 100644 --- a/pkg/chrootarchive/chroot_unix.go +++ b/pkg/chrootarchive/chroot_unix.go @@ -1,3 +1,4 @@ +//go:build !windows && !linux // +build !windows,!linux package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" diff --git a/pkg/chrootarchive/diff_unix.go b/pkg/chrootarchive/diff_unix.go index c64efefcdc..f0e9233ba3 100644 --- a/pkg/chrootarchive/diff_unix.go +++ b/pkg/chrootarchive/diff_unix.go @@ -1,4 +1,5 @@ -//+build !windows +//go:build !windows +// +build !windows package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" diff --git a/pkg/chrootarchive/init_unix.go b/pkg/chrootarchive/init_unix.go index c24fea7d9c..07cfc1c653 100644 --- a/pkg/chrootarchive/init_unix.go +++ b/pkg/chrootarchive/init_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" diff --git a/pkg/containerfs/containerfs_unix.go b/pkg/containerfs/containerfs_unix.go index 6a99459517..5a7ab97e58 100644 --- a/pkg/containerfs/containerfs_unix.go +++ b/pkg/containerfs/containerfs_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package containerfs // import "github.com/docker/docker/pkg/containerfs" diff --git a/pkg/devicemapper/devmapper.go b/pkg/devicemapper/devmapper.go index f9356f5ba6..41d7b65af7 100644 --- a/pkg/devicemapper/devmapper.go +++ b/pkg/devicemapper/devmapper.go @@ -1,3 +1,4 @@ +//go:build linux && cgo // +build linux,cgo package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/devmapper_log.go b/pkg/devicemapper/devmapper_log.go index 5a5773d44f..aa47368258 100644 --- a/pkg/devicemapper/devmapper_log.go +++ b/pkg/devicemapper/devmapper_log.go @@ -1,3 +1,4 @@ +//go:build linux && cgo // +build linux,cgo package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/devmapper_wrapper.go b/pkg/devicemapper/devmapper_wrapper.go index d518657c86..103d54e7d5 100644 --- a/pkg/devicemapper/devmapper_wrapper.go +++ b/pkg/devicemapper/devmapper_wrapper.go @@ -1,3 +1,4 @@ +//go:build linux && cgo // +build linux,cgo package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/devmapper_wrapper_dynamic.go b/pkg/devicemapper/devmapper_wrapper_dynamic.go index 8a1098f7d5..a702cd540a 100644 --- a/pkg/devicemapper/devmapper_wrapper_dynamic.go +++ b/pkg/devicemapper/devmapper_wrapper_dynamic.go @@ -1,3 +1,4 @@ +//go:build linux && cgo && !static_build // +build linux,cgo,!static_build package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/devmapper_wrapper_dynamic_deferred_remove.go b/pkg/devicemapper/devmapper_wrapper_dynamic_deferred_remove.go index 3d3021c4e1..4bfbd01aa8 100644 --- a/pkg/devicemapper/devmapper_wrapper_dynamic_deferred_remove.go +++ b/pkg/devicemapper/devmapper_wrapper_dynamic_deferred_remove.go @@ -1,5 +1,5 @@ -// +build linux,cgo,!static_build -// +build !libdm_dlsym_deferred_remove,!libdm_no_deferred_remove +//go:build linux && cgo && !static_build && !libdm_dlsym_deferred_remove && !libdm_no_deferred_remove +// +build linux,cgo,!static_build,!libdm_dlsym_deferred_remove,!libdm_no_deferred_remove package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/devmapper_wrapper_dynamic_dlsym_deferred_remove.go b/pkg/devicemapper/devmapper_wrapper_dynamic_dlsym_deferred_remove.go index 5dfb369f1f..6db3388c5c 100644 --- a/pkg/devicemapper/devmapper_wrapper_dynamic_dlsym_deferred_remove.go +++ b/pkg/devicemapper/devmapper_wrapper_dynamic_dlsym_deferred_remove.go @@ -1,5 +1,5 @@ -// +build linux,cgo,!static_build -// +build libdm_dlsym_deferred_remove,!libdm_no_deferred_remove +//go:build linux && cgo && !static_build && libdm_dlsym_deferred_remove && !libdm_no_deferred_remove +// +build linux,cgo,!static_build,libdm_dlsym_deferred_remove,!libdm_no_deferred_remove package devicemapper diff --git a/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go b/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go index 8889f0f46f..f1aee1abcc 100644 --- a/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go +++ b/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go @@ -1,5 +1,5 @@ -// +build linux,cgo -// +build !libdm_dlsym_deferred_remove,libdm_no_deferred_remove +//go:build linux && cgo && !libdm_dlsym_deferred_remove && libdm_no_deferred_remove +// +build linux,cgo,!libdm_dlsym_deferred_remove,libdm_no_deferred_remove package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/devicemapper/ioctl.go b/pkg/devicemapper/ioctl.go index ec5a0b33ba..508f477d05 100644 --- a/pkg/devicemapper/ioctl.go +++ b/pkg/devicemapper/ioctl.go @@ -1,3 +1,4 @@ +//go:build linux && cgo // +build linux,cgo package devicemapper // import "github.com/docker/docker/pkg/devicemapper" diff --git a/pkg/directory/directory_unix.go b/pkg/directory/directory_unix.go index f56dd7a8f9..eeedff18a4 100644 --- a/pkg/directory/directory_unix.go +++ b/pkg/directory/directory_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin // +build linux freebsd darwin package directory // import "github.com/docker/docker/pkg/directory" diff --git a/pkg/fileutils/fileutils_unix.go b/pkg/fileutils/fileutils_unix.go index 565396f1c7..af0c26b614 100644 --- a/pkg/fileutils/fileutils_unix.go +++ b/pkg/fileutils/fileutils_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package fileutils // import "github.com/docker/docker/pkg/fileutils" diff --git a/pkg/fsutils/fsutils_linux_test.go b/pkg/fsutils/fsutils_linux_test.go index 4e5a78b519..b627b3fe4d 100644 --- a/pkg/fsutils/fsutils_linux_test.go +++ b/pkg/fsutils/fsutils_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package fsutils // import "github.com/docker/docker/pkg/fsutils" diff --git a/pkg/homedir/homedir_others.go b/pkg/homedir/homedir_others.go index 67ab9e9b31..fc48e674c1 100644 --- a/pkg/homedir/homedir_others.go +++ b/pkg/homedir/homedir_others.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package homedir // import "github.com/docker/docker/pkg/homedir" diff --git a/pkg/homedir/homedir_unix.go b/pkg/homedir/homedir_unix.go index 441bd727b6..d1732dee52 100644 --- a/pkg/homedir/homedir_unix.go +++ b/pkg/homedir/homedir_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package homedir // import "github.com/docker/docker/pkg/homedir" diff --git a/pkg/idtools/idtools_unix.go b/pkg/idtools/idtools_unix.go index e7d25ee471..ceec0339b5 100644 --- a/pkg/idtools/idtools_unix.go +++ b/pkg/idtools/idtools_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package idtools // import "github.com/docker/docker/pkg/idtools" diff --git a/pkg/idtools/idtools_unix_test.go b/pkg/idtools/idtools_unix_test.go index 849d62374b..f1670a6fec 100644 --- a/pkg/idtools/idtools_unix_test.go +++ b/pkg/idtools/idtools_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package idtools // import "github.com/docker/docker/pkg/idtools" diff --git a/pkg/idtools/usergroupadd_unsupported.go b/pkg/idtools/usergroupadd_unsupported.go index e7c4d63118..5e24577e2c 100644 --- a/pkg/idtools/usergroupadd_unsupported.go +++ b/pkg/idtools/usergroupadd_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package idtools // import "github.com/docker/docker/pkg/idtools" diff --git a/pkg/idtools/utils_unix.go b/pkg/idtools/utils_unix.go index 1e2d4a7a75..540672af5a 100644 --- a/pkg/idtools/utils_unix.go +++ b/pkg/idtools/utils_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package idtools // import "github.com/docker/docker/pkg/idtools" diff --git a/pkg/ioutils/temp_unix.go b/pkg/ioutils/temp_unix.go index dc894f9131..4e67ec2f53 100644 --- a/pkg/ioutils/temp_unix.go +++ b/pkg/ioutils/temp_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package ioutils // import "github.com/docker/docker/pkg/ioutils" diff --git a/pkg/loopback/attach_loopback.go b/pkg/loopback/attach_loopback.go index 61c40e07e6..68135d87a8 100644 --- a/pkg/loopback/attach_loopback.go +++ b/pkg/loopback/attach_loopback.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package loopback // import "github.com/docker/docker/pkg/loopback" diff --git a/pkg/loopback/ioctl.go b/pkg/loopback/ioctl.go index 35b03d1f14..8087b187cd 100644 --- a/pkg/loopback/ioctl.go +++ b/pkg/loopback/ioctl.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package loopback // import "github.com/docker/docker/pkg/loopback" diff --git a/pkg/loopback/loop_wrapper.go b/pkg/loopback/loop_wrapper.go index d68551c2e9..10ef1985e8 100644 --- a/pkg/loopback/loop_wrapper.go +++ b/pkg/loopback/loop_wrapper.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package loopback // import "github.com/docker/docker/pkg/loopback" diff --git a/pkg/loopback/loopback.go b/pkg/loopback/loopback.go index 40fde96621..2a3b7cf859 100644 --- a/pkg/loopback/loopback.go +++ b/pkg/loopback/loopback.go @@ -1,3 +1,4 @@ +//go:build linux && cgo // +build linux,cgo package loopback // import "github.com/docker/docker/pkg/loopback" diff --git a/pkg/mount/deprecated_unix.go b/pkg/mount/deprecated_unix.go index 1787f20424..6c79c20bf0 100644 --- a/pkg/mount/deprecated_unix.go +++ b/pkg/mount/deprecated_unix.go @@ -1,3 +1,4 @@ +//go:build !darwin && !windows // +build !darwin,!windows package mount // import "github.com/docker/docker/pkg/mount" diff --git a/pkg/parsers/kernel/kernel.go b/pkg/parsers/kernel/kernel.go index 94780ef610..3245b74166 100644 --- a/pkg/parsers/kernel/kernel.go +++ b/pkg/parsers/kernel/kernel.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // Package kernel provides helper function to get, parse and compare kernel diff --git a/pkg/parsers/kernel/kernel_darwin.go b/pkg/parsers/kernel/kernel_darwin.go index 652a2ce31e..afb5b2e98e 100644 --- a/pkg/parsers/kernel/kernel_darwin.go +++ b/pkg/parsers/kernel/kernel_darwin.go @@ -1,3 +1,4 @@ +//go:build darwin // +build darwin // Package kernel provides helper function to get, parse and compare kernel diff --git a/pkg/parsers/kernel/kernel_unix.go b/pkg/parsers/kernel/kernel_unix.go index 8a9aa31225..b9508d376c 100644 --- a/pkg/parsers/kernel/kernel_unix.go +++ b/pkg/parsers/kernel/kernel_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || openbsd // +build linux freebsd openbsd // Package kernel provides helper function to get, parse and compare kernel diff --git a/pkg/parsers/kernel/kernel_unix_test.go b/pkg/parsers/kernel/kernel_unix_test.go index 8706deca28..1ab3435fa8 100644 --- a/pkg/parsers/kernel/kernel_unix_test.go +++ b/pkg/parsers/kernel/kernel_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package kernel // import "github.com/docker/docker/pkg/parsers/kernel" diff --git a/pkg/parsers/kernel/uname_unsupported.go b/pkg/parsers/kernel/uname_unsupported.go index 97906e4cd7..ed356310c4 100644 --- a/pkg/parsers/kernel/uname_unsupported.go +++ b/pkg/parsers/kernel/uname_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package kernel // import "github.com/docker/docker/pkg/parsers/kernel" diff --git a/pkg/parsers/operatingsystem/operatingsystem_linux_test.go b/pkg/parsers/operatingsystem/operatingsystem_linux_test.go index 75d608a598..2e55617594 100644 --- a/pkg/parsers/operatingsystem/operatingsystem_linux_test.go +++ b/pkg/parsers/operatingsystem/operatingsystem_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatingsystem" diff --git a/pkg/parsers/operatingsystem/operatingsystem_unix.go b/pkg/parsers/operatingsystem/operatingsystem_unix.go index 442154ef6b..951f1b4e42 100644 --- a/pkg/parsers/operatingsystem/operatingsystem_unix.go +++ b/pkg/parsers/operatingsystem/operatingsystem_unix.go @@ -1,3 +1,4 @@ +//go:build freebsd || darwin // +build freebsd darwin package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatingsystem" diff --git a/pkg/pidfile/pidfile_darwin.go b/pkg/pidfile/pidfile_darwin.go index 92746aa7bf..943183d682 100644 --- a/pkg/pidfile/pidfile_darwin.go +++ b/pkg/pidfile/pidfile_darwin.go @@ -1,3 +1,4 @@ +//go:build darwin // +build darwin package pidfile // import "github.com/docker/docker/pkg/pidfile" diff --git a/pkg/pidfile/pidfile_unix.go b/pkg/pidfile/pidfile_unix.go index cc6696d211..bcf9ebcac2 100644 --- a/pkg/pidfile/pidfile_unix.go +++ b/pkg/pidfile/pidfile_unix.go @@ -1,3 +1,4 @@ +//go:build !windows && !darwin // +build !windows,!darwin package pidfile // import "github.com/docker/docker/pkg/pidfile" diff --git a/pkg/platform/architecture_unix.go b/pkg/platform/architecture_unix.go index d2a1f96872..2585e0620f 100644 --- a/pkg/platform/architecture_unix.go +++ b/pkg/platform/architecture_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // Package platform provides helper function to get the runtime architecture diff --git a/pkg/plugins/discovery_unix.go b/pkg/plugins/discovery_unix.go index 58058f2828..d645da8ce4 100644 --- a/pkg/plugins/discovery_unix.go +++ b/pkg/plugins/discovery_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package plugins // import "github.com/docker/docker/pkg/plugins" diff --git a/pkg/plugins/discovery_unix_test.go b/pkg/plugins/discovery_unix_test.go index 60e7d6fecf..99e2fe3203 100644 --- a/pkg/plugins/discovery_unix_test.go +++ b/pkg/plugins/discovery_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package plugins // import "github.com/docker/docker/pkg/plugins" diff --git a/pkg/plugins/plugins_unix.go b/pkg/plugins/plugins_unix.go index cdfbe93458..23e9d5715a 100644 --- a/pkg/plugins/plugins_unix.go +++ b/pkg/plugins/plugins_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package plugins // import "github.com/docker/docker/pkg/plugins" diff --git a/pkg/reexec/command_unix.go b/pkg/reexec/command_unix.go index ceaabbdeee..b90043052e 100644 --- a/pkg/reexec/command_unix.go +++ b/pkg/reexec/command_unix.go @@ -1,3 +1,4 @@ +//go:build freebsd || darwin // +build freebsd darwin package reexec // import "github.com/docker/docker/pkg/reexec" diff --git a/pkg/reexec/command_unsupported.go b/pkg/reexec/command_unsupported.go index e7eed24240..7175853a55 100644 --- a/pkg/reexec/command_unsupported.go +++ b/pkg/reexec/command_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows && !freebsd && !darwin // +build !linux,!windows,!freebsd,!darwin package reexec // import "github.com/docker/docker/pkg/reexec" diff --git a/pkg/signal/signal_linux.go b/pkg/signal/signal_linux.go index 4013bded13..5e166ee1fe 100644 --- a/pkg/signal/signal_linux.go +++ b/pkg/signal/signal_linux.go @@ -1,3 +1,4 @@ +//go:build !mips && !mipsle && !mips64 && !mips64le // +build !mips,!mipsle,!mips64,!mips64le package signal // import "github.com/docker/docker/pkg/signal" diff --git a/pkg/signal/signal_linux_mipsx.go b/pkg/signal/signal_linux_mipsx.go index c78c887af5..6eb49500ef 100644 --- a/pkg/signal/signal_linux_mipsx.go +++ b/pkg/signal/signal_linux_mipsx.go @@ -1,3 +1,4 @@ +//go:build linux && (mips || mipsle || mips64 || mips64le) // +build linux // +build mips mipsle mips64 mips64le diff --git a/pkg/signal/signal_linux_test.go b/pkg/signal/signal_linux_test.go index decd454de3..c4b8a8e971 100644 --- a/pkg/signal/signal_linux_test.go +++ b/pkg/signal/signal_linux_test.go @@ -1,3 +1,4 @@ +//go:build darwin || linux // +build darwin linux package signal // import "github.com/docker/docker/pkg/signal" diff --git a/pkg/signal/signal_unix.go b/pkg/signal/signal_unix.go index a2aa4248fa..09fe2a8aa6 100644 --- a/pkg/signal/signal_unix.go +++ b/pkg/signal/signal_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package signal // import "github.com/docker/docker/pkg/signal" diff --git a/pkg/signal/signal_unsupported.go b/pkg/signal/signal_unsupported.go index 1fd25a83c6..fc692b0b93 100644 --- a/pkg/signal/signal_unsupported.go +++ b/pkg/signal/signal_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !darwin && !freebsd && !windows // +build !linux,!darwin,!freebsd,!windows package signal // import "github.com/docker/docker/pkg/signal" diff --git a/pkg/signal/trap_linux_test.go b/pkg/signal/trap_linux_test.go index 781ca5a354..b2b1c8c024 100644 --- a/pkg/signal/trap_linux_test.go +++ b/pkg/signal/trap_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package signal // import "github.com/docker/docker/pkg/signal" diff --git a/pkg/sysinfo/numcpu.go b/pkg/sysinfo/numcpu.go index eea2d25bf9..5b5921dff4 100644 --- a/pkg/sysinfo/numcpu.go +++ b/pkg/sysinfo/numcpu.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package sysinfo // import "github.com/docker/docker/pkg/sysinfo" diff --git a/pkg/sysinfo/sysinfo_unix.go b/pkg/sysinfo/sysinfo_unix.go index 47a131bc87..4c25884cc2 100644 --- a/pkg/sysinfo/sysinfo_unix.go +++ b/pkg/sysinfo/sysinfo_unix.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package sysinfo // import "github.com/docker/docker/pkg/sysinfo" diff --git a/pkg/system/chtimes_nowindows.go b/pkg/system/chtimes_nowindows.go index d5fab96f9d..84ae157051 100644 --- a/pkg/system/chtimes_nowindows.go +++ b/pkg/system/chtimes_nowindows.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/chtimes_windows_test.go b/pkg/system/chtimes_windows_test.go index d91e4bc6e4..060c515003 100644 --- a/pkg/system/chtimes_windows_test.go +++ b/pkg/system/chtimes_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/filesys_unix.go b/pkg/system/filesys_unix.go index dcee3e9f98..186d9d9a11 100644 --- a/pkg/system/filesys_unix.go +++ b/pkg/system/filesys_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/lcow.go b/pkg/system/lcow.go index 0f00028fbd..4599a3f23c 100644 --- a/pkg/system/lcow.go +++ b/pkg/system/lcow.go @@ -1,3 +1,4 @@ +//go:build windows && !no_lcow // +build windows,!no_lcow package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/lcow_unsupported.go b/pkg/system/lcow_unsupported.go index 3d3cf775a7..daadef31d5 100644 --- a/pkg/system/lcow_unsupported.go +++ b/pkg/system/lcow_unsupported.go @@ -1,3 +1,4 @@ +//go:build !windows || (windows && no_lcow) // +build !windows windows,no_lcow package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/lstat_unix.go b/pkg/system/lstat_unix.go index de5a1c0fb2..654b9f2c9e 100644 --- a/pkg/system/lstat_unix.go +++ b/pkg/system/lstat_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/lstat_unix_test.go b/pkg/system/lstat_unix_test.go index 9fb4a191cf..943b7d6c63 100644 --- a/pkg/system/lstat_unix_test.go +++ b/pkg/system/lstat_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/meminfo_unix_test.go b/pkg/system/meminfo_unix_test.go index e650cfa627..adbc948247 100644 --- a/pkg/system/meminfo_unix_test.go +++ b/pkg/system/meminfo_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/meminfo_unsupported.go b/pkg/system/meminfo_unsupported.go index 56f4494268..207ee58ee6 100644 --- a/pkg/system/meminfo_unsupported.go +++ b/pkg/system/meminfo_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/mknod.go b/pkg/system/mknod.go index b132482e03..5734d47d45 100644 --- a/pkg/system/mknod.go +++ b/pkg/system/mknod.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/path_unix.go b/pkg/system/path_unix.go index b0b93196a1..2c85371b5e 100644 --- a/pkg/system/path_unix.go +++ b/pkg/system/path_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/path_windows_test.go b/pkg/system/path_windows_test.go index b94d25104e..5ba2c84e39 100644 --- a/pkg/system/path_windows_test.go +++ b/pkg/system/path_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/process_unix.go b/pkg/system/process_unix.go index 79aebb5272..145689b88a 100644 --- a/pkg/system/process_unix.go +++ b/pkg/system/process_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin // +build linux freebsd darwin package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/rm.go b/pkg/system/rm.go index c5d80ebda1..f2d81597c9 100644 --- a/pkg/system/rm.go +++ b/pkg/system/rm.go @@ -1,3 +1,4 @@ +//go:build !darwin && !windows // +build !darwin,!windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/rm_nodarwin_test.go b/pkg/system/rm_nodarwin_test.go index f3db37ed10..9047f1ecad 100644 --- a/pkg/system/rm_nodarwin_test.go +++ b/pkg/system/rm_nodarwin_test.go @@ -1,3 +1,4 @@ +//go:build !darwin // +build !darwin package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/rm_test.go b/pkg/system/rm_test.go index 245edb2cca..9db1f64b1e 100644 --- a/pkg/system/rm_test.go +++ b/pkg/system/rm_test.go @@ -1,3 +1,4 @@ +//go:build !darwin && !windows // +build !darwin,!windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/stat_bsd.go b/pkg/system/stat_bsd.go index ea55c3dbb5..8e61d820f0 100644 --- a/pkg/system/stat_bsd.go +++ b/pkg/system/stat_bsd.go @@ -1,3 +1,4 @@ +//go:build freebsd || netbsd // +build freebsd netbsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/stat_unix.go b/pkg/system/stat_unix.go index 86bb6dd55e..a45ffddf75 100644 --- a/pkg/system/stat_unix.go +++ b/pkg/system/stat_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/stat_unix_test.go b/pkg/system/stat_unix_test.go index 3c25d7812d..416b07eaa5 100644 --- a/pkg/system/stat_unix_test.go +++ b/pkg/system/stat_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/syscall_unix.go b/pkg/system/syscall_unix.go index 905d10f153..7c90bffaa5 100644 --- a/pkg/system/syscall_unix.go +++ b/pkg/system/syscall_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/umask.go b/pkg/system/umask.go index 9912a2babb..d4a15cbedc 100644 --- a/pkg/system/umask.go +++ b/pkg/system/umask.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/utimes_unix.go b/pkg/system/utimes_unix.go index 61ba8c474c..2768750a00 100644 --- a/pkg/system/utimes_unix.go +++ b/pkg/system/utimes_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/utimes_unix_test.go b/pkg/system/utimes_unix_test.go index cc0e7cbf1f..dd85c94466 100644 --- a/pkg/system/utimes_unix_test.go +++ b/pkg/system/utimes_unix_test.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/utimes_unsupported.go b/pkg/system/utimes_unsupported.go index 095e072e1d..bfed4af032 100644 --- a/pkg/system/utimes_unsupported.go +++ b/pkg/system/utimes_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !freebsd // +build !linux,!freebsd package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/system/xattrs_unsupported.go b/pkg/system/xattrs_unsupported.go index d780a90cd3..b165a5dbfe 100644 --- a/pkg/system/xattrs_unsupported.go +++ b/pkg/system/xattrs_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package system // import "github.com/docker/docker/pkg/system" diff --git a/pkg/term/deprecated_unix.go b/pkg/term/deprecated_unix.go index ed9eb11862..2d3641dc15 100644 --- a/pkg/term/deprecated_unix.go +++ b/pkg/term/deprecated_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package term // import "github.com/docker/docker/pkg/term" diff --git a/pkg/term/windows/deprecated.go b/pkg/term/windows/deprecated.go index 50c390c662..bebef13991 100644 --- a/pkg/term/windows/deprecated.go +++ b/pkg/term/windows/deprecated.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows // Package windowsconsole implements ANSI-aware input and output streams for use diff --git a/plugin/backend_unsupported.go b/plugin/backend_unsupported.go index c0666e858e..98d35c1dfa 100644 --- a/plugin/backend_unsupported.go +++ b/plugin/backend_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package plugin // import "github.com/docker/docker/plugin" diff --git a/plugin/v2/plugin_unsupported.go b/plugin/v2/plugin_unsupported.go index 734b2ac664..1b08aec171 100644 --- a/plugin/v2/plugin_unsupported.go +++ b/plugin/v2/plugin_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package v2 // import "github.com/docker/docker/plugin/v2" diff --git a/profiles/apparmor/apparmor.go b/profiles/apparmor/apparmor.go index 2f58ee852c..c2c805bdcc 100644 --- a/profiles/apparmor/apparmor.go +++ b/profiles/apparmor/apparmor.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package apparmor // import "github.com/docker/docker/profiles/apparmor" diff --git a/profiles/apparmor/template.go b/profiles/apparmor/template.go index b12e3ff3b2..7c8525a71c 100644 --- a/profiles/apparmor/template.go +++ b/profiles/apparmor/template.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package apparmor // import "github.com/docker/docker/profiles/apparmor" diff --git a/profiles/seccomp/default_linux.go b/profiles/seccomp/default_linux.go index fb593f336f..f75ab7f5d1 100644 --- a/profiles/seccomp/default_linux.go +++ b/profiles/seccomp/default_linux.go @@ -1,3 +1,4 @@ +//go:build seccomp // +build seccomp package seccomp // import "github.com/docker/docker/profiles/seccomp" diff --git a/profiles/seccomp/generate.go b/profiles/seccomp/generate.go index 32f22bb375..b978cee8f6 100644 --- a/profiles/seccomp/generate.go +++ b/profiles/seccomp/generate.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package main diff --git a/profiles/seccomp/seccomp_test.go b/profiles/seccomp/seccomp_test.go index f4cfb4799b..15bba8b632 100644 --- a/profiles/seccomp/seccomp_test.go +++ b/profiles/seccomp/seccomp_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package seccomp // import "github.com/docker/docker/profiles/seccomp" diff --git a/profiles/seccomp/seccomp_unsupported.go b/profiles/seccomp/seccomp_unsupported.go index 01f3eb96fd..d337695e10 100644 --- a/profiles/seccomp/seccomp_unsupported.go +++ b/profiles/seccomp/seccomp_unsupported.go @@ -1,3 +1,4 @@ +//go:build linux && !seccomp // +build linux,!seccomp package seccomp // import "github.com/docker/docker/profiles/seccomp" diff --git a/quota/projectquota.go b/quota/projectquota.go index b8ffe64aaf..19078ce1dc 100644 --- a/quota/projectquota.go +++ b/quota/projectquota.go @@ -1,3 +1,4 @@ +//go:build linux && !exclude_disk_quota && cgo // +build linux,!exclude_disk_quota,cgo // diff --git a/quota/projectquota_test.go b/quota/projectquota_test.go index 9bf5c295cc..0970cfe9b2 100644 --- a/quota/projectquota_test.go +++ b/quota/projectquota_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package quota // import "github.com/docker/docker/quota" diff --git a/quota/projectquota_unsupported.go b/quota/projectquota_unsupported.go index 1c72c3daea..ed21055c2e 100644 --- a/quota/projectquota_unsupported.go +++ b/quota/projectquota_unsupported.go @@ -1,3 +1,4 @@ +//go:build (linux && exclude_disk_quota) || (linux && !cgo) || !linux // +build linux,exclude_disk_quota linux,!cgo !linux package quota // import "github.com/docker/docker/quota" diff --git a/quota/testhelpers.go b/quota/testhelpers.go index d9a7098a6b..52ab2ce949 100644 --- a/quota/testhelpers.go +++ b/quota/testhelpers.go @@ -1,3 +1,4 @@ +//go:build linux && !exclude_disk_quota && cgo // +build linux,!exclude_disk_quota,cgo package quota // import "github.com/docker/docker/quota" diff --git a/registry/config_unix.go b/registry/config_unix.go index 8ee8fedfc1..b5bb31cfa6 100644 --- a/registry/config_unix.go +++ b/registry/config_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package registry // import "github.com/docker/docker/registry" diff --git a/runconfig/config_unix.go b/runconfig/config_unix.go index 65e8d6fcd4..78cef81554 100644 --- a/runconfig/config_unix.go +++ b/runconfig/config_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package runconfig // import "github.com/docker/docker/runconfig" diff --git a/runconfig/hostconfig_test.go b/runconfig/hostconfig_test.go index 40b6db8155..37219bbc4e 100644 --- a/runconfig/hostconfig_test.go +++ b/runconfig/hostconfig_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package runconfig // import "github.com/docker/docker/runconfig" diff --git a/runconfig/hostconfig_unix.go b/runconfig/hostconfig_unix.go index 588cfa5644..f8e4fb0b54 100644 --- a/runconfig/hostconfig_unix.go +++ b/runconfig/hostconfig_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package runconfig // import "github.com/docker/docker/runconfig" diff --git a/runconfig/hostconfig_windows_test.go b/runconfig/hostconfig_windows_test.go index d7a480f313..ccfe939ca8 100644 --- a/runconfig/hostconfig_windows_test.go +++ b/runconfig/hostconfig_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package runconfig // import "github.com/docker/docker/runconfig" diff --git a/testutil/daemon/daemon_unix.go b/testutil/daemon/daemon_unix.go index 788f420243..fefae55f6d 100644 --- a/testutil/daemon/daemon_unix.go +++ b/testutil/daemon/daemon_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package daemon // import "github.com/docker/docker/testutil/daemon" diff --git a/testutil/request/npipe.go b/testutil/request/npipe.go index e6ab03945e..e827ad6b80 100644 --- a/testutil/request/npipe.go +++ b/testutil/request/npipe.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package request diff --git a/volume/local/local_linux_test.go b/volume/local/local_linux_test.go index fd31580895..9b150a2e6d 100644 --- a/volume/local/local_linux_test.go +++ b/volume/local/local_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package local // import "github.com/docker/docker/volume/local" diff --git a/volume/local/local_unix.go b/volume/local/local_unix.go index c8163ccd13..4fdd182544 100644 --- a/volume/local/local_unix.go +++ b/volume/local/local_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd // Package local provides the default implementation for volumes. It @@ -32,9 +33,9 @@ var ( "size": {}, // quota size limit } mandatoryOpts = map[string][]string{ - "device": []string{"type"}, - "type": []string{"device"}, - "o": []string{"device", "type"}, + "device": {"type"}, + "type": {"device"}, + "o": {"device", "type"}, } ) diff --git a/volume/mounts/validate_unix_test.go b/volume/mounts/validate_unix_test.go index a319371451..4c46b95cd3 100644 --- a/volume/mounts/validate_unix_test.go +++ b/volume/mounts/validate_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package mounts // import "github.com/docker/docker/volume/mounts" diff --git a/volume/mounts/volume_unix.go b/volume/mounts/volume_unix.go index c6d51e0710..e7e7bcc038 100644 --- a/volume/mounts/volume_unix.go +++ b/volume/mounts/volume_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin // +build linux freebsd darwin package mounts // import "github.com/docker/docker/volume/mounts" diff --git a/volume/service/default_driver.go b/volume/service/default_driver.go index b5986ab717..7a4c7e7026 100644 --- a/volume/service/default_driver.go +++ b/volume/service/default_driver.go @@ -1,3 +1,4 @@ +//go:build linux || windows // +build linux windows package service // import "github.com/docker/docker/volume/service" diff --git a/volume/service/default_driver_stubs.go b/volume/service/default_driver_stubs.go index 0539b1369b..b60cf768bb 100644 --- a/volume/service/default_driver_stubs.go +++ b/volume/service/default_driver_stubs.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package service // import "github.com/docker/docker/volume/service" diff --git a/volume/service/store_unix.go b/volume/service/store_unix.go index 4ccc4b9999..75a7a61809 100644 --- a/volume/service/store_unix.go +++ b/volume/service/store_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin // +build linux freebsd darwin package service // import "github.com/docker/docker/volume/service"