diff --git a/Dockerfile b/Dockerfile index 1caa4a06c0..63640f2cb6 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.7 +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 5f3b8ad019..6c3ab8bf94 100644 --- a/Dockerfile.e2e +++ b/Dockerfile.e2e @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16.7 +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 d7e2dca895..166582b834 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.7 +ARG GO_VERSION=1.17.0 ARG BASE_DEBIAN_DISTRO="bullseye" ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}" diff --git a/Dockerfile.windows b/Dockerfile.windows index 1f2a625a7a..85aaa5800d 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.7 +ARG GO_VERSION=1.17.0 ARG CONTAINERD_VERSION=1.5.5 ARG GOTESTSUM_COMMIT=v0.5.3 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 df723886f4..3ae1f08e8d 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 ffa63c5aad..b25906b828 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 6cc85e53f3..7c5a574ffb 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 a05e1c6899..59d84e5cce 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 68bd81af43..8d0e8b8d46 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 5bbbc197b6..89e74ee8b6 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/cmd/dockerd/trap/trap_linux_test.go b/cmd/dockerd/trap/trap_linux_test.go index b283c7da0a..19b38854b4 100644 --- a/cmd/dockerd/trap/trap_linux_test.go +++ b/cmd/dockerd/trap/trap_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package trap // import "github.com/docker/docker/cmd/dockerd/trap" diff --git a/container/container_unix.go b/container/container_unix.go index eef2ee8b3a..418e5ccdfb 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 c5cd348f94..6376001613 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 24bc779efa..863788d72d 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/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 b8f99e7920..514b457c02 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 aef6eef132..da85f8f608 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 32f600d2be..d8529a6158 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 dca8beb739..76bffb1d54 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 e8bebca3e4..7666d14f6e 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 a29e8c2d1b..4ed710cb47 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 fc011a4d35..ffef343898 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 36bcead216..9dceea6d3f 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 87d26d4860..479afac326 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 5aa4dd91bc..9ae30a3696 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 a1e02ce4dd..aedc9df015 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 c1b617f4dc..9bcef1225d 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 49c43ea9af..7eb1795d17 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 c945ad9234..91af5232c1 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 2982639557..ad138abaf0 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/overlay/overlay.go b/daemon/graphdriver/overlay/overlay.go index 90be0e3d64..4918c5e3f5 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 e18da0d7b0..80c737b49e 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 36a921a018..ef315ac772 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 df9c8a4cd3..3ce6b5e2da 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 4e4a112b66..facdbb0407 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 f9099a2094..c1b3f5792e 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 3053c2f1b0..f28008488e 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 0c1f67de57..7975269a21 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 c5b5df6e2d..698717f734 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 3051979392..917f94192c 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 76557815ab..5a43ecf4ac 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 d8571a5ad1..590267c484 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 a05c58c950..5cfe585e16 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 c742f0924e..1f4ecb576d 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_linux_test.go b/daemon/seccomp_linux_test.go index 8735e4bd23..bb5331da37 100644 --- a/daemon/seccomp_linux_test.go +++ b/daemon/seccomp_linux_test.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 cedda94bcb..0287acaf7a 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 8b7db877b6..a566d19b4a 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 9204268560..af6946156e 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 6c60e918ef..6bd09b7392 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 d7abbf44cb..f684a6c675 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 0cc1e36eea..0a62cf8edf 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 c2ff5ebc0c..674f32b054 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 87f24e448d..6a67bb5be4 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 7086966a66..3379808ad7 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 a69cd24d5f..7d00da02e7 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 875d9d1505..ac015b1715 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/libnetwork/cmd/ovrouter/ovrouter.go b/libnetwork/cmd/ovrouter/ovrouter.go index 6371e6eda4..bca34d504f 100644 --- a/libnetwork/cmd/ovrouter/ovrouter.go +++ b/libnetwork/cmd/ovrouter/ovrouter.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package main diff --git a/libnetwork/drivers/bridge/bridge.go b/libnetwork/drivers/bridge/bridge.go index 7691d5b161..ae8101d7df 100644 --- a/libnetwork/drivers/bridge/bridge.go +++ b/libnetwork/drivers/bridge/bridge.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/bridge_store.go b/libnetwork/drivers/bridge/bridge_store.go index 0b910b4d3b..7578f964b9 100644 --- a/libnetwork/drivers/bridge/bridge_store.go +++ b/libnetwork/drivers/bridge/bridge_store.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/bridge_test.go b/libnetwork/drivers/bridge/bridge_test.go index 242a5c9c55..c4ada1630a 100644 --- a/libnetwork/drivers/bridge/bridge_test.go +++ b/libnetwork/drivers/bridge/bridge_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/errors.go b/libnetwork/drivers/bridge/errors.go index d9cc16cbb9..5cb0692b56 100644 --- a/libnetwork/drivers/bridge/errors.go +++ b/libnetwork/drivers/bridge/errors.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/interface.go b/libnetwork/drivers/bridge/interface.go index 9612b3b324..1c53e38d9d 100644 --- a/libnetwork/drivers/bridge/interface.go +++ b/libnetwork/drivers/bridge/interface.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/interface_test.go b/libnetwork/drivers/bridge/interface_test.go index bc581c2699..0d4e58bd2e 100644 --- a/libnetwork/drivers/bridge/interface_test.go +++ b/libnetwork/drivers/bridge/interface_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/link.go b/libnetwork/drivers/bridge/link.go index 7369747404..7be183975a 100644 --- a/libnetwork/drivers/bridge/link.go +++ b/libnetwork/drivers/bridge/link.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/link_test.go b/libnetwork/drivers/bridge/link_test.go index 1fe94456e7..3450292abd 100644 --- a/libnetwork/drivers/bridge/link_test.go +++ b/libnetwork/drivers/bridge/link_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_int8.go b/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_int8.go index 68d368c915..5a0763efdf 100644 --- a/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_int8.go +++ b/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_int8.go @@ -1,3 +1,4 @@ +//go:build !arm && !ppc64 && !ppc64le && !riscv64 // +build !arm,!ppc64,!ppc64le,!riscv64 package bridge diff --git a/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_uint8.go b/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_uint8.go index a937f5016c..e177146077 100644 --- a/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_uint8.go +++ b/libnetwork/drivers/bridge/netlink_deprecated_linux_rawsockaddr_data_uint8.go @@ -1,3 +1,4 @@ +//go:build arm || ppc64 || ppc64le || riscv64 // +build arm ppc64 ppc64le riscv64 package bridge diff --git a/libnetwork/drivers/bridge/netlink_deprecated_unsupported.go b/libnetwork/drivers/bridge/netlink_deprecated_unsupported.go index 7e2d57b660..d4d34bef44 100644 --- a/libnetwork/drivers/bridge/netlink_deprecated_unsupported.go +++ b/libnetwork/drivers/bridge/netlink_deprecated_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package bridge diff --git a/libnetwork/drivers/bridge/network_test.go b/libnetwork/drivers/bridge/network_test.go index 7795492a24..0c4525a563 100644 --- a/libnetwork/drivers/bridge/network_test.go +++ b/libnetwork/drivers/bridge/network_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/port_mapping.go b/libnetwork/drivers/bridge/port_mapping.go index 51e38ea3f3..afff4b4045 100644 --- a/libnetwork/drivers/bridge/port_mapping.go +++ b/libnetwork/drivers/bridge/port_mapping.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/port_mapping_test.go b/libnetwork/drivers/bridge/port_mapping_test.go index 483e91a91e..c5402cf13d 100644 --- a/libnetwork/drivers/bridge/port_mapping_test.go +++ b/libnetwork/drivers/bridge/port_mapping_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup.go b/libnetwork/drivers/bridge/setup.go index dd781cf1d0..aa6b1fe9fb 100644 --- a/libnetwork/drivers/bridge/setup.go +++ b/libnetwork/drivers/bridge/setup.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_bridgenetfiltering.go b/libnetwork/drivers/bridge/setup_bridgenetfiltering.go index efe59580b0..7e3b0f0a0a 100644 --- a/libnetwork/drivers/bridge/setup_bridgenetfiltering.go +++ b/libnetwork/drivers/bridge/setup_bridgenetfiltering.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_bridgenetfiltering_test.go b/libnetwork/drivers/bridge/setup_bridgenetfiltering_test.go index d6794e2c5b..67290bde89 100644 --- a/libnetwork/drivers/bridge/setup_bridgenetfiltering_test.go +++ b/libnetwork/drivers/bridge/setup_bridgenetfiltering_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_device.go b/libnetwork/drivers/bridge/setup_device.go index 54b4decaf4..7dd03a044b 100644 --- a/libnetwork/drivers/bridge/setup_device.go +++ b/libnetwork/drivers/bridge/setup_device.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_device_test.go b/libnetwork/drivers/bridge/setup_device_test.go index 55ccdb8184..7526fda6fb 100644 --- a/libnetwork/drivers/bridge/setup_device_test.go +++ b/libnetwork/drivers/bridge/setup_device_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_firewalld.go b/libnetwork/drivers/bridge/setup_firewalld.go index 00bbf685a2..b0a1ebcaf9 100644 --- a/libnetwork/drivers/bridge/setup_firewalld.go +++ b/libnetwork/drivers/bridge/setup_firewalld.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ip_forwarding.go b/libnetwork/drivers/bridge/setup_ip_forwarding.go index e5059cceb2..1fcf4ed595 100644 --- a/libnetwork/drivers/bridge/setup_ip_forwarding.go +++ b/libnetwork/drivers/bridge/setup_ip_forwarding.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ip_forwarding_test.go b/libnetwork/drivers/bridge/setup_ip_forwarding_test.go index a3425b7bc5..cec7e09a98 100644 --- a/libnetwork/drivers/bridge/setup_ip_forwarding_test.go +++ b/libnetwork/drivers/bridge/setup_ip_forwarding_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ip_tables.go b/libnetwork/drivers/bridge/setup_ip_tables.go index b9dab9e75d..a9d39b30ad 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables.go +++ b/libnetwork/drivers/bridge/setup_ip_tables.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ip_tables_test.go b/libnetwork/drivers/bridge/setup_ip_tables_test.go index d8a3437c03..1eb781f3e9 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables_test.go +++ b/libnetwork/drivers/bridge/setup_ip_tables_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ipv4.go b/libnetwork/drivers/bridge/setup_ipv4.go index 341d034f49..5d6b58b399 100644 --- a/libnetwork/drivers/bridge/setup_ipv4.go +++ b/libnetwork/drivers/bridge/setup_ipv4.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ipv4_test.go b/libnetwork/drivers/bridge/setup_ipv4_test.go index b23ca56fd5..1d513ab910 100644 --- a/libnetwork/drivers/bridge/setup_ipv4_test.go +++ b/libnetwork/drivers/bridge/setup_ipv4_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ipv6.go b/libnetwork/drivers/bridge/setup_ipv6.go index c3bb431ce2..2b582328d0 100644 --- a/libnetwork/drivers/bridge/setup_ipv6.go +++ b/libnetwork/drivers/bridge/setup_ipv6.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_ipv6_test.go b/libnetwork/drivers/bridge/setup_ipv6_test.go index f58a595bbb..bf5b5feeb0 100644 --- a/libnetwork/drivers/bridge/setup_ipv6_test.go +++ b/libnetwork/drivers/bridge/setup_ipv6_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_verify.go b/libnetwork/drivers/bridge/setup_verify.go index f022e17910..e7fd1bf23c 100644 --- a/libnetwork/drivers/bridge/setup_verify.go +++ b/libnetwork/drivers/bridge/setup_verify.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/bridge/setup_verify_test.go b/libnetwork/drivers/bridge/setup_verify_test.go index 4f22b51134..b949918b64 100644 --- a/libnetwork/drivers/bridge/setup_verify_test.go +++ b/libnetwork/drivers/bridge/setup_verify_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package bridge diff --git a/libnetwork/drivers/ipvlan/ipvlan.go b/libnetwork/drivers/ipvlan/ipvlan.go index d04ca5055d..4e2abcf0dd 100644 --- a/libnetwork/drivers/ipvlan/ipvlan.go +++ b/libnetwork/drivers/ipvlan/ipvlan.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_endpoint.go b/libnetwork/drivers/ipvlan/ipvlan_endpoint.go index 243359542f..7d4c42a442 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_endpoint.go +++ b/libnetwork/drivers/ipvlan/ipvlan_endpoint.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_joinleave.go b/libnetwork/drivers/ipvlan/ipvlan_joinleave.go index 0dceaaec71..99e7b1fa93 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_joinleave.go +++ b/libnetwork/drivers/ipvlan/ipvlan_joinleave.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_network.go b/libnetwork/drivers/ipvlan/ipvlan_network.go index 361a761927..cde03a721b 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_network.go +++ b/libnetwork/drivers/ipvlan/ipvlan_network.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_setup.go b/libnetwork/drivers/ipvlan/ipvlan_setup.go index aa930b8c14..d7e037aaf7 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_setup.go +++ b/libnetwork/drivers/ipvlan/ipvlan_setup.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_setup_test.go b/libnetwork/drivers/ipvlan/ipvlan_setup_test.go index d311f664cc..0bc2bbd785 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_setup_test.go +++ b/libnetwork/drivers/ipvlan/ipvlan_setup_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_state.go b/libnetwork/drivers/ipvlan/ipvlan_state.go index 33eb2e55b1..fc26f1613e 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_state.go +++ b/libnetwork/drivers/ipvlan/ipvlan_state.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_store.go b/libnetwork/drivers/ipvlan/ipvlan_store.go index a4f58fa8b5..9f0eab6fc9 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_store.go +++ b/libnetwork/drivers/ipvlan/ipvlan_store.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/ipvlan/ipvlan_test.go b/libnetwork/drivers/ipvlan/ipvlan_test.go index 9514c9fa6c..b0f4de9cd7 100644 --- a/libnetwork/drivers/ipvlan/ipvlan_test.go +++ b/libnetwork/drivers/ipvlan/ipvlan_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package ipvlan diff --git a/libnetwork/drivers/macvlan/macvlan.go b/libnetwork/drivers/macvlan/macvlan.go index 9e5277e297..030323c6a0 100644 --- a/libnetwork/drivers/macvlan/macvlan.go +++ b/libnetwork/drivers/macvlan/macvlan.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_endpoint.go b/libnetwork/drivers/macvlan/macvlan_endpoint.go index 1850221234..8d4390f779 100644 --- a/libnetwork/drivers/macvlan/macvlan_endpoint.go +++ b/libnetwork/drivers/macvlan/macvlan_endpoint.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_joinleave.go b/libnetwork/drivers/macvlan/macvlan_joinleave.go index 47a0534904..69f083328b 100644 --- a/libnetwork/drivers/macvlan/macvlan_joinleave.go +++ b/libnetwork/drivers/macvlan/macvlan_joinleave.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_network.go b/libnetwork/drivers/macvlan/macvlan_network.go index e4386c9faa..943e90df85 100644 --- a/libnetwork/drivers/macvlan/macvlan_network.go +++ b/libnetwork/drivers/macvlan/macvlan_network.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_setup.go b/libnetwork/drivers/macvlan/macvlan_setup.go index 0624301876..7415a07a27 100644 --- a/libnetwork/drivers/macvlan/macvlan_setup.go +++ b/libnetwork/drivers/macvlan/macvlan_setup.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_setup_test.go b/libnetwork/drivers/macvlan/macvlan_setup_test.go index 84d977ac6f..f2053c1679 100644 --- a/libnetwork/drivers/macvlan/macvlan_setup_test.go +++ b/libnetwork/drivers/macvlan/macvlan_setup_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_state.go b/libnetwork/drivers/macvlan/macvlan_state.go index fbf05f4d63..bb3e326867 100644 --- a/libnetwork/drivers/macvlan/macvlan_state.go +++ b/libnetwork/drivers/macvlan/macvlan_state.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_store.go b/libnetwork/drivers/macvlan/macvlan_store.go index d61e531be9..5cc04eac8e 100644 --- a/libnetwork/drivers/macvlan/macvlan_store.go +++ b/libnetwork/drivers/macvlan/macvlan_store.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/macvlan/macvlan_test.go b/libnetwork/drivers/macvlan/macvlan_test.go index 12720d1ee6..0439ffdc0d 100644 --- a/libnetwork/drivers/macvlan/macvlan_test.go +++ b/libnetwork/drivers/macvlan/macvlan_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package macvlan diff --git a/libnetwork/drivers/overlay/encryption.go b/libnetwork/drivers/overlay/encryption.go index 9bffba4fbf..c5ab835cf3 100644 --- a/libnetwork/drivers/overlay/encryption.go +++ b/libnetwork/drivers/overlay/encryption.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/filter.go b/libnetwork/drivers/overlay/filter.go index 9da5f4270c..31a8c1f43f 100644 --- a/libnetwork/drivers/overlay/filter.go +++ b/libnetwork/drivers/overlay/filter.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/joinleave.go b/libnetwork/drivers/overlay/joinleave.go index f922233017..69b6d87068 100644 --- a/libnetwork/drivers/overlay/joinleave.go +++ b/libnetwork/drivers/overlay/joinleave.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/ostweaks_unsupported.go b/libnetwork/drivers/overlay/ostweaks_unsupported.go index a5e8d91083..a90019e2d6 100644 --- a/libnetwork/drivers/overlay/ostweaks_unsupported.go +++ b/libnetwork/drivers/overlay/ostweaks_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package overlay diff --git a/libnetwork/drivers/overlay/ov_endpoint.go b/libnetwork/drivers/overlay/ov_endpoint.go index 954693c4ac..76619966d3 100644 --- a/libnetwork/drivers/overlay/ov_endpoint.go +++ b/libnetwork/drivers/overlay/ov_endpoint.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/ov_network.go b/libnetwork/drivers/overlay/ov_network.go index 4cd121dd62..44ce1d6694 100644 --- a/libnetwork/drivers/overlay/ov_network.go +++ b/libnetwork/drivers/overlay/ov_network.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/ov_serf.go b/libnetwork/drivers/overlay/ov_serf.go index e327a4580d..07b955227a 100644 --- a/libnetwork/drivers/overlay/ov_serf.go +++ b/libnetwork/drivers/overlay/ov_serf.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/ov_utils.go b/libnetwork/drivers/overlay/ov_utils.go index 8c7c38ea0e..0db0102d04 100644 --- a/libnetwork/drivers/overlay/ov_utils.go +++ b/libnetwork/drivers/overlay/ov_utils.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/overlay.go b/libnetwork/drivers/overlay/overlay.go index 0bc150e3e8..50263c3d79 100644 --- a/libnetwork/drivers/overlay/overlay.go +++ b/libnetwork/drivers/overlay/overlay.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/overlay_test.go b/libnetwork/drivers/overlay/overlay_test.go index 2280d16504..55194c5730 100644 --- a/libnetwork/drivers/overlay/overlay_test.go +++ b/libnetwork/drivers/overlay/overlay_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/peerdb.go b/libnetwork/drivers/overlay/peerdb.go index d0ff640475..e812d3068c 100644 --- a/libnetwork/drivers/overlay/peerdb.go +++ b/libnetwork/drivers/overlay/peerdb.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/overlay/peerdb_test.go b/libnetwork/drivers/overlay/peerdb_test.go index 5c3a444345..1c924f61cf 100644 --- a/libnetwork/drivers/overlay/peerdb_test.go +++ b/libnetwork/drivers/overlay/peerdb_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package overlay diff --git a/libnetwork/drivers/windows/port_mapping.go b/libnetwork/drivers/windows/port_mapping.go index 5a9d1478c3..56933b62e8 100644 --- a/libnetwork/drivers/windows/port_mapping.go +++ b/libnetwork/drivers/windows/port_mapping.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package windows diff --git a/libnetwork/drivers/windows/windows.go b/libnetwork/drivers/windows/windows.go index e19e299c5b..86a4691db4 100644 --- a/libnetwork/drivers/windows/windows.go +++ b/libnetwork/drivers/windows/windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows // Shim for the Host Network Service (HNS) to manage networking for diff --git a/libnetwork/drivers/windows/windows_store.go b/libnetwork/drivers/windows/windows_store.go index bb0e58532e..e5810443d0 100644 --- a/libnetwork/drivers/windows/windows_store.go +++ b/libnetwork/drivers/windows/windows_store.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package windows diff --git a/libnetwork/drivers/windows/windows_test.go b/libnetwork/drivers/windows/windows_test.go index 6f891a747d..ea248e9d79 100644 --- a/libnetwork/drivers/windows/windows_test.go +++ b/libnetwork/drivers/windows/windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package windows diff --git a/libnetwork/endpoint_info_unix.go b/libnetwork/endpoint_info_unix.go index f2534f4904..018f02b367 100644 --- a/libnetwork/endpoint_info_unix.go +++ b/libnetwork/endpoint_info_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork diff --git a/libnetwork/endpoint_info_windows.go b/libnetwork/endpoint_info_windows.go index 93ad8330e9..378cf8454d 100644 --- a/libnetwork/endpoint_info_windows.go +++ b/libnetwork/endpoint_info_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package libnetwork diff --git a/libnetwork/endpoint_test.go b/libnetwork/endpoint_test.go index 49f3ff57b0..f09c5d0157 100644 --- a/libnetwork/endpoint_test.go +++ b/libnetwork/endpoint_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork diff --git a/libnetwork/firewall_others.go b/libnetwork/firewall_others.go index 4f72ae9df3..c5a1fbac9f 100644 --- a/libnetwork/firewall_others.go +++ b/libnetwork/firewall_others.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package libnetwork diff --git a/libnetwork/ipams/builtin/builtin_unix.go b/libnetwork/ipams/builtin/builtin_unix.go index 54c02241ec..e5d142121a 100644 --- a/libnetwork/ipams/builtin/builtin_unix.go +++ b/libnetwork/ipams/builtin/builtin_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || darwin // +build linux freebsd darwin package builtin diff --git a/libnetwork/ipams/builtin/builtin_windows.go b/libnetwork/ipams/builtin/builtin_windows.go index e1ead4036b..730e2d1f59 100644 --- a/libnetwork/ipams/builtin/builtin_windows.go +++ b/libnetwork/ipams/builtin/builtin_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package builtin diff --git a/libnetwork/iptables/conntrack.go b/libnetwork/iptables/conntrack.go index 4e8d0c863c..5abae4eede 100644 --- a/libnetwork/iptables/conntrack.go +++ b/libnetwork/iptables/conntrack.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package iptables diff --git a/libnetwork/iptables/firewalld.go b/libnetwork/iptables/firewalld.go index c2d82d2d5b..3cc5422d4a 100644 --- a/libnetwork/iptables/firewalld.go +++ b/libnetwork/iptables/firewalld.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package iptables diff --git a/libnetwork/iptables/firewalld_test.go b/libnetwork/iptables/firewalld_test.go index 14d8a761d2..1b47221196 100644 --- a/libnetwork/iptables/firewalld_test.go +++ b/libnetwork/iptables/firewalld_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package iptables diff --git a/libnetwork/iptables/iptables.go b/libnetwork/iptables/iptables.go index c854085ea6..51a3e2bdc2 100644 --- a/libnetwork/iptables/iptables.go +++ b/libnetwork/iptables/iptables.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package iptables diff --git a/libnetwork/iptables/iptables_test.go b/libnetwork/iptables/iptables_test.go index fe732ff4cb..d46e5153cc 100644 --- a/libnetwork/iptables/iptables_test.go +++ b/libnetwork/iptables/iptables_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package iptables diff --git a/libnetwork/libnetwork_test.go b/libnetwork/libnetwork_test.go index 576998d17e..6f0a2f1d61 100644 --- a/libnetwork/libnetwork_test.go +++ b/libnetwork/libnetwork_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package libnetwork_test diff --git a/libnetwork/libnetwork_unix_test.go b/libnetwork/libnetwork_unix_test.go index 4366ea8b3f..e039fa9065 100644 --- a/libnetwork/libnetwork_unix_test.go +++ b/libnetwork/libnetwork_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork_test diff --git a/libnetwork/netutils/utils_linux.go b/libnetwork/netutils/utils_linux.go index 6de60a87ff..d34b976150 100644 --- a/libnetwork/netutils/utils_linux.go +++ b/libnetwork/netutils/utils_linux.go @@ -1,4 +1,6 @@ +//go:build linux // +build linux + // Network utility functions. package netutils diff --git a/libnetwork/network_unix.go b/libnetwork/network_unix.go index a638c92b23..8b529b8644 100644 --- a/libnetwork/network_unix.go +++ b/libnetwork/network_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork diff --git a/libnetwork/network_windows.go b/libnetwork/network_windows.go index ab5c8c7950..fda8e436d9 100644 --- a/libnetwork/network_windows.go +++ b/libnetwork/network_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package libnetwork diff --git a/libnetwork/networkdb/networkdb.pb.go b/libnetwork/networkdb/networkdb.pb.go index aa6fe21410..58faed9816 100644 --- a/libnetwork/networkdb/networkdb.pb.go +++ b/libnetwork/networkdb/networkdb.pb.go @@ -145,7 +145,9 @@ var NetworkEvent_Type_value = map[string]int32{ func (x NetworkEvent_Type) String() string { return proto.EnumName(NetworkEvent_Type_name, int32(x)) } -func (NetworkEvent_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{2, 0} } +func (NetworkEvent_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorNetworkdb, []int{2, 0} +} type TableEvent_Type int32 diff --git a/libnetwork/osl/kernel/knobs_unsupported.go b/libnetwork/osl/kernel/knobs_unsupported.go index 32f258f416..f0403b7ce0 100644 --- a/libnetwork/osl/kernel/knobs_unsupported.go +++ b/libnetwork/osl/kernel/knobs_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package kernel diff --git a/libnetwork/osl/namespace_unsupported.go b/libnetwork/osl/namespace_unsupported.go index 74372e2492..4179459c13 100644 --- a/libnetwork/osl/namespace_unsupported.go +++ b/libnetwork/osl/namespace_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows && !freebsd // +build !linux,!windows,!freebsd package osl diff --git a/libnetwork/osl/sandbox_unsupported.go b/libnetwork/osl/sandbox_unsupported.go index 51a656c806..8e811a4617 100644 --- a/libnetwork/osl/sandbox_unsupported.go +++ b/libnetwork/osl/sandbox_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows && !freebsd // +build !linux,!windows,!freebsd package osl diff --git a/libnetwork/osl/sandbox_unsupported_test.go b/libnetwork/osl/sandbox_unsupported_test.go index fddd03a126..32b4657f2b 100644 --- a/libnetwork/osl/sandbox_unsupported_test.go +++ b/libnetwork/osl/sandbox_unsupported_test.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package osl diff --git a/libnetwork/portallocator/portallocator_unix.go b/libnetwork/portallocator/portallocator_unix.go index a1db634aea..21adb62e0c 100644 --- a/libnetwork/portallocator/portallocator_unix.go +++ b/libnetwork/portallocator/portallocator_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package portallocator diff --git a/libnetwork/resolver_unix.go b/libnetwork/resolver_unix.go index fac1c72241..ff00f3af6b 100644 --- a/libnetwork/resolver_unix.go +++ b/libnetwork/resolver_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork diff --git a/libnetwork/resolver_windows.go b/libnetwork/resolver_windows.go index aa33b1a2ec..3d422fcd06 100644 --- a/libnetwork/resolver_windows.go +++ b/libnetwork/resolver_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package libnetwork diff --git a/libnetwork/sandbox_dns_unix.go b/libnetwork/sandbox_dns_unix.go index fda8687111..387f998957 100644 --- a/libnetwork/sandbox_dns_unix.go +++ b/libnetwork/sandbox_dns_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package libnetwork diff --git a/libnetwork/sandbox_dns_windows.go b/libnetwork/sandbox_dns_windows.go index 75c33ffced..62af20b6bf 100644 --- a/libnetwork/sandbox_dns_windows.go +++ b/libnetwork/sandbox_dns_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package libnetwork diff --git a/libnetwork/sandbox_externalkey_unix.go b/libnetwork/sandbox_externalkey_unix.go index 241a092b3d..8f770a5d1a 100644 --- a/libnetwork/sandbox_externalkey_unix.go +++ b/libnetwork/sandbox_externalkey_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package libnetwork diff --git a/libnetwork/sandbox_externalkey_windows.go b/libnetwork/sandbox_externalkey_windows.go index 42f28d2199..c866942abb 100644 --- a/libnetwork/sandbox_externalkey_windows.go +++ b/libnetwork/sandbox_externalkey_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package libnetwork diff --git a/libnetwork/service_common.go b/libnetwork/service_common.go index 02cae58242..a2973d7e39 100644 --- a/libnetwork/service_common.go +++ b/libnetwork/service_common.go @@ -1,3 +1,4 @@ +//go:build linux || windows // +build linux windows package libnetwork diff --git a/libnetwork/service_unsupported.go b/libnetwork/service_unsupported.go index ee9750600c..a2ca3ea769 100644 --- a/libnetwork/service_unsupported.go +++ b/libnetwork/service_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package libnetwork diff --git a/libnetwork/testutils/context_unix.go b/libnetwork/testutils/context_unix.go index 7eb7d2ee07..601c00f91d 100644 --- a/libnetwork/testutils/context_unix.go +++ b/libnetwork/testutils/context_unix.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd // +build linux freebsd package testutils 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 412cd5a3b0..e3e4a5dcb5 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 8047d9ded2..efbaf02449 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 9b45fd88dc..9178c278f2 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 926ae8a7b7..05456c67ee 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 5e0def6c56..ecdb398727 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/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_other.go b/pkg/sysinfo/sysinfo_other.go index 8ccc7d79bc..aa97c0f29a 100644 --- a/pkg/sysinfo/sysinfo_other.go +++ b/pkg/sysinfo/sysinfo_other.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux 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/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 19681985da..197a37a219 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/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 99a7e20025..f7d93d2cc4 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 9558d8c58b..8d077ae664 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 5996d54854..3366382619 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 4a3ee02c7e..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 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 9f74c9e7c1..92eadce518 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"