summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-03-18 09:11:53 +0100
committerValentin Rothberg <vrothberg@redhat.com>2022-03-18 09:11:53 +0100
commitea08765f400d828907f231baa84bd880a00d95f1 (patch)
tree3ddf8be1f7b9d66416451632a3664a13a925a548
parente59f71d230cf5435dc569add90e22cc644e38647 (diff)
downloadpodman-ea08765f400d828907f231baa84bd880a00d95f1.tar.gz
podman-ea08765f400d828907f231baa84bd880a00d95f1.tar.bz2
podman-ea08765f400d828907f231baa84bd880a00d95f1.zip
go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
-rw-r--r--cmd/podman/early_init_unsupported.go1
-rw-r--r--cmd/podman/images/utils_unsupported.go1
-rw-r--r--cmd/podman/machine/init.go1
-rw-r--r--cmd/podman/machine/machine.go1
-rw-r--r--cmd/podman/machine/machine_unsupported.go1
-rw-r--r--cmd/podman/machine/platform.go1
-rw-r--r--cmd/podman/machine/rm.go1
-rw-r--r--cmd/podman/machine/set.go1
-rw-r--r--cmd/podman/machine/ssh.go1
-rw-r--r--cmd/podman/registry/config_abi.go1
-rw-r--r--cmd/podman/registry/config_tunnel.go1
-rw-r--r--cmd/podman/syslog_unsupported.go1
-rw-r--r--cmd/podman/system/migrate.go1
-rw-r--r--cmd/podman/system/renumber.go1
-rw-r--r--cmd/podman/system/reset.go1
-rw-r--r--cmd/podman/system/service.go1
-rw-r--r--cmd/podman/system/service_abi.go1
-rw-r--r--cmd/podman/utils/signals_linux.go1
-rw-r--r--cmd/podman/utils/signals_windows.go1
-rw-r--r--dependencies/dependencies.go1
-rw-r--r--libpod/boltdb_state_linux.go1
-rw-r--r--libpod/container_copy_linux.go1
-rw-r--r--libpod/container_linux.go1
-rw-r--r--libpod/container_log_unsupported.go3
-rw-r--r--libpod/container_stat_linux.go1
-rw-r--r--libpod/container_top_linux.go1
-rw-r--r--libpod/events/events_unsupported.go1
-rw-r--r--libpod/events/journal_linux.go1
-rw-r--r--libpod/events/journal_unsupported.go1
-rw-r--r--libpod/linkmode/linkmode_dynamic.go1
-rw-r--r--libpod/linkmode/linkmode_static.go1
-rw-r--r--libpod/lock/shm/shm_lock.go1
-rw-r--r--libpod/lock/shm/shm_lock_nocgo.go1
-rw-r--r--libpod/lock/shm/shm_lock_test.go1
-rw-r--r--libpod/lock/shm_lock_manager_linux.go1
-rw-r--r--libpod/lock/shm_lock_manager_unsupported.go1
-rw-r--r--libpod/mounts_linux.go1
-rw-r--r--libpod/networking_linux.go1
-rw-r--r--libpod/networking_slirp4netns.go1
-rw-r--r--libpod/oci_attach_linux.go3
-rw-r--r--libpod/oci_conmon_linux.go1
-rw-r--r--libpod/pod_top_linux.go1
-rw-r--r--libpod/runtime_migrate.go1
-rw-r--r--libpod/runtime_volume_linux.go1
-rw-r--r--libpod/stats.go1
-rw-r--r--libpod/util_linux.go1
-rw-r--r--pkg/bindings/generator/generator.go1
-rw-r--r--pkg/bindings/images/build_unix.go1
-rw-r--r--pkg/criu/criu.go1
-rw-r--r--pkg/criu/criu_unsupported.go1
-rw-r--r--pkg/ctime/ctime_linux.go1
-rw-r--r--pkg/ctime/ctime_unsupported.go1
-rw-r--r--pkg/domain/infra/runtime_abi.go1
-rw-r--r--pkg/domain/infra/runtime_abi_unsupported.go1
-rw-r--r--pkg/domain/infra/runtime_libpod.go1
-rw-r--r--pkg/domain/infra/runtime_proxy.go1
-rw-r--r--pkg/domain/infra/runtime_tunnel.go1
-rw-r--r--pkg/env/env_unix.go1
-rw-r--r--pkg/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go1
-rw-r--r--pkg/machine/fcos.go1
-rw-r--r--pkg/machine/fedora.go1
-rw-r--r--pkg/machine/ignition_darwin.go3
-rw-r--r--pkg/machine/ignition_schema.go1
-rw-r--r--pkg/machine/ignition_windows.go3
-rw-r--r--pkg/machine/keys.go1
-rw-r--r--pkg/machine/machine_unsupported.go1
-rw-r--r--pkg/machine/pull.go1
-rw-r--r--pkg/machine/qemu/machine_unsupported.go1
-rw-r--r--pkg/machine/wsl/machine_unsupported.go1
-rw-r--r--pkg/rootless/rootless_linux.go1
-rw-r--r--pkg/rootless/rootless_unsupported.go1
-rw-r--r--pkg/rootlessport/rootlessport_linux.go1
-rw-r--r--pkg/servicereaper/service.go3
-rw-r--r--pkg/signal/signal_linux.go4
-rw-r--r--pkg/signal/signal_linux_mipsx.go1
-rw-r--r--pkg/signal/signal_unix.go1
-rw-r--r--pkg/signal/signal_unsupported.go1
-rw-r--r--pkg/specgen/config_unsupported.go1
-rw-r--r--pkg/specgen/generate/config_linux_cgo.go1
-rw-r--r--pkg/specgen/generate/config_linux_nocgo.go1
-rw-r--r--pkg/terminal/console_unix.go1
-rw-r--r--pkg/terminal/console_windows.go1
-rw-r--r--pkg/util/mountOpts_other.go1
-rw-r--r--pkg/util/utils_darwin.go3
-rw-r--r--pkg/util/utils_supported.go1
-rw-r--r--pkg/util/utils_unsupported.go1
-rw-r--r--pkg/util/utils_windows.go1
-rw-r--r--test/checkseccomp/checkseccomp.go1
-rw-r--r--test/e2e/libpod_suite_test.go1
-rw-r--r--test/e2e/play_build_test.go1
-rw-r--r--test/e2e/run_apparmor_test.go1
-rw-r--r--utils/utils_supported.go1
-rw-r--r--utils/utils_windows.go1
93 files changed, 100 insertions, 8 deletions
diff --git a/cmd/podman/early_init_unsupported.go b/cmd/podman/early_init_unsupported.go
index 4e748559f..55bb0906f 100644
--- a/cmd/podman/early_init_unsupported.go
+++ b/cmd/podman/early_init_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package main
diff --git a/cmd/podman/images/utils_unsupported.go b/cmd/podman/images/utils_unsupported.go
index 69d1df786..7d4a19ded 100644
--- a/cmd/podman/images/utils_unsupported.go
+++ b/cmd/podman/images/utils_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package images
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go
index ab13d8651..8fb9f17c7 100644
--- a/cmd/podman/machine/init.go
+++ b/cmd/podman/machine/init.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/cmd/podman/machine/machine.go b/cmd/podman/machine/machine.go
index 4937fcbda..d3775f022 100644
--- a/cmd/podman/machine/machine.go
+++ b/cmd/podman/machine/machine.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/cmd/podman/machine/machine_unsupported.go b/cmd/podman/machine/machine_unsupported.go
index 2f4189446..e11049888 100644
--- a/cmd/podman/machine/machine_unsupported.go
+++ b/cmd/podman/machine/machine_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !amd64 && !arm64
// +build !amd64,!arm64
package machine
diff --git a/cmd/podman/machine/platform.go b/cmd/podman/machine/platform.go
index bbcf06c85..77fec083e 100644
--- a/cmd/podman/machine/platform.go
+++ b/cmd/podman/machine/platform.go
@@ -1,3 +1,4 @@
+//go:build (amd64 && !windows) || (arm64 && !windows)
// +build amd64,!windows arm64,!windows
package machine
diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go
index 3e5d5fb0b..82c68c4cf 100644
--- a/cmd/podman/machine/rm.go
+++ b/cmd/podman/machine/rm.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/cmd/podman/machine/set.go b/cmd/podman/machine/set.go
index c978206f0..4a05a9c1c 100644
--- a/cmd/podman/machine/set.go
+++ b/cmd/podman/machine/set.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go
index ba37f7ba4..e1175d632 100644
--- a/cmd/podman/machine/ssh.go
+++ b/cmd/podman/machine/ssh.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/cmd/podman/registry/config_abi.go b/cmd/podman/registry/config_abi.go
index 4a909c17e..7babfa169 100644
--- a/cmd/podman/registry/config_abi.go
+++ b/cmd/podman/registry/config_abi.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package registry
diff --git a/cmd/podman/registry/config_tunnel.go b/cmd/podman/registry/config_tunnel.go
index bb3da947e..dfdbab8f8 100644
--- a/cmd/podman/registry/config_tunnel.go
+++ b/cmd/podman/registry/config_tunnel.go
@@ -1,3 +1,4 @@
+//go:build remote
// +build remote
package registry
diff --git a/cmd/podman/syslog_unsupported.go b/cmd/podman/syslog_unsupported.go
index 3765d96b9..42a7851ab 100644
--- a/cmd/podman/syslog_unsupported.go
+++ b/cmd/podman/syslog_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package main
diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go
index c6b6546e7..5d7b31314 100644
--- a/cmd/podman/system/migrate.go
+++ b/cmd/podman/system/migrate.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package system
diff --git a/cmd/podman/system/renumber.go b/cmd/podman/system/renumber.go
index b310dc607..f24488822 100644
--- a/cmd/podman/system/renumber.go
+++ b/cmd/podman/system/renumber.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package system
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index 07904faaa..e8cf127b7 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package system
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index daf252401..dd64db169 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -1,3 +1,4 @@
+//go:build linux && !remote
// +build linux,!remote
package system
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 560cce847..d6b42ed29 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -1,3 +1,4 @@
+//go:build linux && !remote
// +build linux,!remote
package system
diff --git a/cmd/podman/utils/signals_linux.go b/cmd/podman/utils/signals_linux.go
index f0a14aff0..dd0507c0e 100644
--- a/cmd/podman/utils/signals_linux.go
+++ b/cmd/podman/utils/signals_linux.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package utils
diff --git a/cmd/podman/utils/signals_windows.go b/cmd/podman/utils/signals_windows.go
index 30b058cb9..e6fcc1b32 100644
--- a/cmd/podman/utils/signals_windows.go
+++ b/cmd/podman/utils/signals_windows.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package utils
diff --git a/dependencies/dependencies.go b/dependencies/dependencies.go
index b1b0aee08..adc074d93 100644
--- a/dependencies/dependencies.go
+++ b/dependencies/dependencies.go
@@ -1,3 +1,4 @@
+//go:build !linter
// +build !linter
package dependencies
diff --git a/libpod/boltdb_state_linux.go b/libpod/boltdb_state_linux.go
index 63ce9784e..8bb10fb63 100644
--- a/libpod/boltdb_state_linux.go
+++ b/libpod/boltdb_state_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/container_copy_linux.go b/libpod/container_copy_linux.go
index d16d635b7..38927d691 100644
--- a/libpod/container_copy_linux.go
+++ b/libpod/container_copy_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/container_linux.go b/libpod/container_linux.go
index c445fb8af..8b517e69f 100644
--- a/libpod/container_linux.go
+++ b/libpod/container_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/container_log_unsupported.go b/libpod/container_log_unsupported.go
index f9ca26966..4f50f9f4c 100644
--- a/libpod/container_log_unsupported.go
+++ b/libpod/container_log_unsupported.go
@@ -1,4 +1,5 @@
-//+build !linux !systemd
+//go:build !linux || !systemd
+// +build !linux !systemd
package libpod
diff --git a/libpod/container_stat_linux.go b/libpod/container_stat_linux.go
index d90684197..84ab984e0 100644
--- a/libpod/container_stat_linux.go
+++ b/libpod/container_stat_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go
index 41300a708..9b3dbc873 100644
--- a/libpod/container_top_linux.go
+++ b/libpod/container_top_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/events/events_unsupported.go b/libpod/events/events_unsupported.go
index 5b32a1b4b..25c175524 100644
--- a/libpod/events/events_unsupported.go
+++ b/libpod/events/events_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package events
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index cc63df120..866042a4c 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -1,3 +1,4 @@
+//go:build systemd
// +build systemd
package events
diff --git a/libpod/events/journal_unsupported.go b/libpod/events/journal_unsupported.go
index 004efdab2..6ed39792b 100644
--- a/libpod/events/journal_unsupported.go
+++ b/libpod/events/journal_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !systemd
// +build !systemd
package events
diff --git a/libpod/linkmode/linkmode_dynamic.go b/libpod/linkmode/linkmode_dynamic.go
index 6d51d60e0..f020fa53e 100644
--- a/libpod/linkmode/linkmode_dynamic.go
+++ b/libpod/linkmode/linkmode_dynamic.go
@@ -1,3 +1,4 @@
+//go:build !static
// +build !static
package linkmode
diff --git a/libpod/linkmode/linkmode_static.go b/libpod/linkmode/linkmode_static.go
index 2db083f4a..b181ad285 100644
--- a/libpod/linkmode/linkmode_static.go
+++ b/libpod/linkmode/linkmode_static.go
@@ -1,3 +1,4 @@
+//go:build static
// +build static
package linkmode
diff --git a/libpod/lock/shm/shm_lock.go b/libpod/lock/shm/shm_lock.go
index fea02a619..c7f4d1bc5 100644
--- a/libpod/lock/shm/shm_lock.go
+++ b/libpod/lock/shm/shm_lock.go
@@ -1,3 +1,4 @@
+//go:build linux && cgo
// +build linux,cgo
package shm
diff --git a/libpod/lock/shm/shm_lock_nocgo.go b/libpod/lock/shm/shm_lock_nocgo.go
index 627344d9c..31fc02223 100644
--- a/libpod/lock/shm/shm_lock_nocgo.go
+++ b/libpod/lock/shm/shm_lock_nocgo.go
@@ -1,3 +1,4 @@
+//go:build linux && !cgo
// +build linux,!cgo
package shm
diff --git a/libpod/lock/shm/shm_lock_test.go b/libpod/lock/shm/shm_lock_test.go
index cb83c7c2c..8dfc849d6 100644
--- a/libpod/lock/shm/shm_lock_test.go
+++ b/libpod/lock/shm/shm_lock_test.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package shm
diff --git a/libpod/lock/shm_lock_manager_linux.go b/libpod/lock/shm_lock_manager_linux.go
index 8f3b6df7f..3076cd864 100644
--- a/libpod/lock/shm_lock_manager_linux.go
+++ b/libpod/lock/shm_lock_manager_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package lock
diff --git a/libpod/lock/shm_lock_manager_unsupported.go b/libpod/lock/shm_lock_manager_unsupported.go
index 1d6e3fcbd..d578359ab 100644
--- a/libpod/lock/shm_lock_manager_unsupported.go
+++ b/libpod/lock/shm_lock_manager_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package lock
diff --git a/libpod/mounts_linux.go b/libpod/mounts_linux.go
index e6aa09eac..f6945b3a3 100644
--- a/libpod/mounts_linux.go
+++ b/libpod/mounts_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 7fd80927b..d2d1e12cb 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/networking_slirp4netns.go b/libpod/networking_slirp4netns.go
index cc44f78f7..a7a002657 100644
--- a/libpod/networking_slirp4netns.go
+++ b/libpod/networking_slirp4netns.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go
index 1ee664e81..b5eabec1f 100644
--- a/libpod/oci_attach_linux.go
+++ b/libpod/oci_attach_linux.go
@@ -1,4 +1,5 @@
-//+build linux
+//go:build linux
+// +build linux
package libpod
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index a328f7621..1945dca8c 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go
index 43823a106..83a070807 100644
--- a/libpod/pod_top_linux.go
+++ b/libpod/pod_top_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/runtime_migrate.go b/libpod/runtime_migrate.go
index 32fdc7b5d..fccd5bdee 100644
--- a/libpod/runtime_migrate.go
+++ b/libpod/runtime_migrate.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index c4fe3db90..3d585fa7a 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/stats.go b/libpod/stats.go
index dbb10a27e..b5d39240d 100644
--- a/libpod/stats.go
+++ b/libpod/stats.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/libpod/util_linux.go b/libpod/util_linux.go
index dd115c7fb..fe98056dc 100644
--- a/libpod/util_linux.go
+++ b/libpod/util_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package libpod
diff --git a/pkg/bindings/generator/generator.go b/pkg/bindings/generator/generator.go
index a224013ea..e69973be1 100644
--- a/pkg/bindings/generator/generator.go
+++ b/pkg/bindings/generator/generator.go
@@ -1,3 +1,4 @@
+//go:build ignore
// +build ignore
package main
diff --git a/pkg/bindings/images/build_unix.go b/pkg/bindings/images/build_unix.go
index 0afb1deb6..67a5e2998 100644
--- a/pkg/bindings/images/build_unix.go
+++ b/pkg/bindings/images/build_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package images
diff --git a/pkg/criu/criu.go b/pkg/criu/criu.go
index 967da0dca..b54870abc 100644
--- a/pkg/criu/criu.go
+++ b/pkg/criu/criu.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package criu
diff --git a/pkg/criu/criu_unsupported.go b/pkg/criu/criu_unsupported.go
index 51cd0c1fd..3e3ed9c6c 100644
--- a/pkg/criu/criu_unsupported.go
+++ b/pkg/criu/criu_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package criu
diff --git a/pkg/ctime/ctime_linux.go b/pkg/ctime/ctime_linux.go
index 113693e87..7eb3caa6d 100644
--- a/pkg/ctime/ctime_linux.go
+++ b/pkg/ctime/ctime_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package ctime
diff --git a/pkg/ctime/ctime_unsupported.go b/pkg/ctime/ctime_unsupported.go
index 325731353..afee56027 100644
--- a/pkg/ctime/ctime_unsupported.go
+++ b/pkg/ctime/ctime_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package ctime
diff --git a/pkg/domain/infra/runtime_abi.go b/pkg/domain/infra/runtime_abi.go
index 5b7b7cf8a..39989c96b 100644
--- a/pkg/domain/infra/runtime_abi.go
+++ b/pkg/domain/infra/runtime_abi.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package infra
diff --git a/pkg/domain/infra/runtime_abi_unsupported.go b/pkg/domain/infra/runtime_abi_unsupported.go
index b4414dc54..9e5bd01eb 100644
--- a/pkg/domain/infra/runtime_abi_unsupported.go
+++ b/pkg/domain/infra/runtime_abi_unsupported.go
@@ -1,3 +1,4 @@
+//go:build remote
// +build remote
package infra
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index f9ceb9305..dffd90dbe 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package infra
diff --git a/pkg/domain/infra/runtime_proxy.go b/pkg/domain/infra/runtime_proxy.go
index a70b61165..e5761d4ab 100644
--- a/pkg/domain/infra/runtime_proxy.go
+++ b/pkg/domain/infra/runtime_proxy.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package infra
diff --git a/pkg/domain/infra/runtime_tunnel.go b/pkg/domain/infra/runtime_tunnel.go
index 68f8b0dac..8a4de032f 100644
--- a/pkg/domain/infra/runtime_tunnel.go
+++ b/pkg/domain/infra/runtime_tunnel.go
@@ -1,3 +1,4 @@
+//go:build remote
// +build remote
package infra
diff --git a/pkg/env/env_unix.go b/pkg/env/env_unix.go
index 16061a700..690078f33 100644
--- a/pkg/env/env_unix.go
+++ b/pkg/env/env_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package env
diff --git a/pkg/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go b/pkg/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go
index 2501d5516..a502b5adb 100644
--- a/pkg/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go
+++ b/pkg/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go
@@ -1,3 +1,4 @@
+//go:build !notest
// +build !notest
/*
diff --git a/pkg/machine/fcos.go b/pkg/machine/fcos.go
index 4d3e2edf4..6215ae08f 100644
--- a/pkg/machine/fcos.go
+++ b/pkg/machine/fcos.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/pkg/machine/fedora.go b/pkg/machine/fedora.go
index cd713dde7..b26921b52 100644
--- a/pkg/machine/fedora.go
+++ b/pkg/machine/fedora.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/pkg/machine/ignition_darwin.go b/pkg/machine/ignition_darwin.go
index 9ede4b026..b9fbf218d 100644
--- a/pkg/machine/ignition_darwin.go
+++ b/pkg/machine/ignition_darwin.go
@@ -1,4 +1,5 @@
-//+build darwin
+//go:build darwin
+// +build darwin
package machine
diff --git a/pkg/machine/ignition_schema.go b/pkg/machine/ignition_schema.go
index 8cfb0d04e..d6b86229c 100644
--- a/pkg/machine/ignition_schema.go
+++ b/pkg/machine/ignition_schema.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/pkg/machine/ignition_windows.go b/pkg/machine/ignition_windows.go
index c0de48bd3..0fcc06273 100644
--- a/pkg/machine/ignition_windows.go
+++ b/pkg/machine/ignition_windows.go
@@ -1,4 +1,5 @@
-//+build windows
+//go:build windows
+// +build windows
package machine
diff --git a/pkg/machine/keys.go b/pkg/machine/keys.go
index 711b091f0..15c1f73d8 100644
--- a/pkg/machine/keys.go
+++ b/pkg/machine/keys.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/pkg/machine/machine_unsupported.go b/pkg/machine/machine_unsupported.go
index da1437984..a12140e16 100644
--- a/pkg/machine/machine_unsupported.go
+++ b/pkg/machine/machine_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !amd64 && !arm64
// +build !amd64,!arm64
package machine
diff --git a/pkg/machine/pull.go b/pkg/machine/pull.go
index cf1e708b1..26abedfcd 100644
--- a/pkg/machine/pull.go
+++ b/pkg/machine/pull.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
diff --git a/pkg/machine/qemu/machine_unsupported.go b/pkg/machine/qemu/machine_unsupported.go
index e3ce05e3d..794e710f9 100644
--- a/pkg/machine/qemu/machine_unsupported.go
+++ b/pkg/machine/qemu/machine_unsupported.go
@@ -1,3 +1,4 @@
+//go:build (!amd64 && !arm64) || windows
// +build !amd64,!arm64 windows
package qemu
diff --git a/pkg/machine/wsl/machine_unsupported.go b/pkg/machine/wsl/machine_unsupported.go
index 043c5d729..856f9dd0c 100644
--- a/pkg/machine/wsl/machine_unsupported.go
+++ b/pkg/machine/wsl/machine_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package wsl
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index a0b6edcfb..786e28093 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -1,3 +1,4 @@
+//go:build linux && cgo
// +build linux,cgo
package rootless
diff --git a/pkg/rootless/rootless_unsupported.go b/pkg/rootless/rootless_unsupported.go
index 7dfb4a4b2..fe164e235 100644
--- a/pkg/rootless/rootless_unsupported.go
+++ b/pkg/rootless/rootless_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux || !cgo
// +build !linux !cgo
package rootless
diff --git a/pkg/rootlessport/rootlessport_linux.go b/pkg/rootlessport/rootlessport_linux.go
index b89a92d1e..6918a7e8c 100644
--- a/pkg/rootlessport/rootlessport_linux.go
+++ b/pkg/rootlessport/rootlessport_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
// Package rootlessport provides reexec for RootlessKit-based port forwarder.
diff --git a/pkg/servicereaper/service.go b/pkg/servicereaper/service.go
index e105148f0..61445bc19 100644
--- a/pkg/servicereaper/service.go
+++ b/pkg/servicereaper/service.go
@@ -1,4 +1,5 @@
-//+build linux
+//go:build linux
+// +build linux
package servicereaper
diff --git a/pkg/signal/signal_linux.go b/pkg/signal/signal_linux.go
index 305b9d21f..21e09c9fe 100644
--- a/pkg/signal/signal_linux.go
+++ b/pkg/signal/signal_linux.go
@@ -1,5 +1,5 @@
-// +build linux
-// +build !mips,!mipsle,!mips64,!mips64le
+//go:build linux && !mips && !mipsle && !mips64 && !mips64le
+// +build linux,!mips,!mipsle,!mips64,!mips64le
// Signal handling for Linux only.
package signal
diff --git a/pkg/signal/signal_linux_mipsx.go b/pkg/signal/signal_linux_mipsx.go
index 45c9d5af1..52b07aaf4 100644
--- a/pkg/signal/signal_linux_mipsx.go
+++ b/pkg/signal/signal_linux_mipsx.go
@@ -1,3 +1,4 @@
+//go:build linux && (mips || mipsle || mips64 || mips64le)
// +build linux
// +build mips mipsle mips64 mips64le
diff --git a/pkg/signal/signal_unix.go b/pkg/signal/signal_unix.go
index f35abddc1..c0aa62d21 100644
--- a/pkg/signal/signal_unix.go
+++ b/pkg/signal/signal_unix.go
@@ -1,3 +1,4 @@
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris || zos
// +build aix darwin dragonfly freebsd netbsd openbsd solaris zos
// Signal handling for Linux only.
diff --git a/pkg/signal/signal_unsupported.go b/pkg/signal/signal_unsupported.go
index 45946f142..d8bba7c90 100644
--- a/pkg/signal/signal_unsupported.go
+++ b/pkg/signal/signal_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
// Signal handling for Linux only.
diff --git a/pkg/specgen/config_unsupported.go b/pkg/specgen/config_unsupported.go
index 70a60ac47..a6bf77277 100644
--- a/pkg/specgen/config_unsupported.go
+++ b/pkg/specgen/config_unsupported.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package specgen
diff --git a/pkg/specgen/generate/config_linux_cgo.go b/pkg/specgen/generate/config_linux_cgo.go
index 239655c72..efab6679a 100644
--- a/pkg/specgen/generate/config_linux_cgo.go
+++ b/pkg/specgen/generate/config_linux_cgo.go
@@ -1,3 +1,4 @@
+//go:build linux && cgo
// +build linux,cgo
package generate
diff --git a/pkg/specgen/generate/config_linux_nocgo.go b/pkg/specgen/generate/config_linux_nocgo.go
index 9ead739a7..99b0c4eb2 100644
--- a/pkg/specgen/generate/config_linux_nocgo.go
+++ b/pkg/specgen/generate/config_linux_nocgo.go
@@ -1,3 +1,4 @@
+//go:build linux && !cgo
// +build linux,!cgo
package generate
diff --git a/pkg/terminal/console_unix.go b/pkg/terminal/console_unix.go
index 6eee6aa2f..e6c0442c9 100644
--- a/pkg/terminal/console_unix.go
+++ b/pkg/terminal/console_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package terminal
diff --git a/pkg/terminal/console_windows.go b/pkg/terminal/console_windows.go
index 9a636d681..1a7da3335 100644
--- a/pkg/terminal/console_windows.go
+++ b/pkg/terminal/console_windows.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package terminal
diff --git a/pkg/util/mountOpts_other.go b/pkg/util/mountOpts_other.go
index 6a34942e5..64b4dd1d9 100644
--- a/pkg/util/mountOpts_other.go
+++ b/pkg/util/mountOpts_other.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package util
diff --git a/pkg/util/utils_darwin.go b/pkg/util/utils_darwin.go
index 33a46a5d4..66ae85e9c 100644
--- a/pkg/util/utils_darwin.go
+++ b/pkg/util/utils_darwin.go
@@ -1,4 +1,5 @@
-//+build darwin
+//go:build darwin
+// +build darwin
package util
diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go
index 848b35a45..50e4b1b7b 100644
--- a/pkg/util/utils_supported.go
+++ b/pkg/util/utils_supported.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package util
diff --git a/pkg/util/utils_unsupported.go b/pkg/util/utils_unsupported.go
index 62805d7c8..896346493 100644
--- a/pkg/util/utils_unsupported.go
+++ b/pkg/util/utils_unsupported.go
@@ -1,3 +1,4 @@
+//go:build darwin || windows
// +build darwin windows
package util
diff --git a/pkg/util/utils_windows.go b/pkg/util/utils_windows.go
index 46ca5e7f1..2732124f2 100644
--- a/pkg/util/utils_windows.go
+++ b/pkg/util/utils_windows.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package util
diff --git a/test/checkseccomp/checkseccomp.go b/test/checkseccomp/checkseccomp.go
index 9046e0955..6c188ec0d 100644
--- a/test/checkseccomp/checkseccomp.go
+++ b/test/checkseccomp/checkseccomp.go
@@ -1,3 +1,4 @@
+//go:build seccomp
// +build seccomp
package main
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index ccd7c771e..cf81a0348 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package integration
diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go
index 849ba7162..96785c569 100644
--- a/test/e2e/play_build_test.go
+++ b/test/e2e/play_build_test.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
// build for play kube is not supported on remote yet.
diff --git a/test/e2e/run_apparmor_test.go b/test/e2e/run_apparmor_test.go
index e6526217a..64a01deb7 100644
--- a/test/e2e/run_apparmor_test.go
+++ b/test/e2e/run_apparmor_test.go
@@ -1,3 +1,4 @@
+//go:build !remote
// +build !remote
package integration
diff --git a/utils/utils_supported.go b/utils/utils_supported.go
index 561372607..ab2de2ce1 100644
--- a/utils/utils_supported.go
+++ b/utils/utils_supported.go
@@ -1,3 +1,4 @@
+//go:build linux || darwin
// +build linux darwin
package utils
diff --git a/utils/utils_windows.go b/utils/utils_windows.go
index 1a2196029..2c159ab06 100644
--- a/utils/utils_windows.go
+++ b/utils/utils_windows.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package utils