From d9316a99fdf76e4e0c1f72343777c8c028eb27fc Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 14 Dec 2021 16:12:55 -0800 Subject: [PATCH] Use gofmt to add new build constraint syntax (#4558) * Use gofmt to add new build constraint syntax Signed-off-by: c-kruse * update changelog entry Signed-off-by: c-kruse --- CHANGELOG.md | 1 + agent/agent_test.go | 1 + agent/check_handler_env_unix_test.go | 1 + agent/check_handler_env_windows_test.go | 1 + agent/cmd/install_windows.go | 1 + agent/cmd/logger_unix.go | 1 + agent/cmd/windows.go | 1 + agent/debug_test.go | 1 + agent/sockets_test.go | 34 +++++++++---------- agent/statsd_server.go | 1 + agent/statsd_server_test.go | 1 + asset/fetcher_unix.go | 1 + asset/fetcher_windows.go | 1 + backend/apid/actions/actions_test.go | 1 + .../apid/handlers/patch_integration_test.go | 1 + backend/backend_test.go | 1 + backend/cmd/logger_unix.go | 1 + backend/debug_test.go | 1 + backend/etcd/etcd_test.go | 1 + backend/etcd/sequence_test.go | 3 +- backend/eventd/integration_test.go | 1 + backend/eventd/logger_test.go | 1 + backend/keepalived/integration_test.go | 1 + backend/liveness/liveness_test.go | 1 + backend/queue/queue_test.go | 1 + backend/ringv2/pool_test.go | 1 + backend/ringv2/ringv2_test.go | 1 + backend/schedulerd/check_watcher_test.go | 1 + backend/schedulerd/debug_test.go | 1 + backend/schedulerd/executor_test.go | 1 + backend/schedulerd/schedulerd_test.go | 1 + backend/store/cache/cache_integration_test.go | 1 + .../store/cache/v2/cache_integration_test.go | 1 + backend/store/etcd/asset_store_test.go | 1 + backend/store/etcd/authentication_test.go | 1 + backend/store/etcd/check_store_test.go | 1 + backend/store/etcd/cluster_id_store_test.go | 1 + backend/store/etcd/debug_test.go | 1 + backend/store/etcd/entity_store_test.go | 1 + .../etcd/event_store_integration_test.go | 1 + backend/store/etcd/filter_store_test.go | 1 + backend/store/etcd/handler_store_test.go | 1 + backend/store/etcd/health_store_test.go | 1 + backend/store/etcd/hook_store_test.go | 1 + backend/store/etcd/keepalive_store_test.go | 1 + backend/store/etcd/migrations_test.go | 1 + backend/store/etcd/mutator_store_test.go | 1 + backend/store/etcd/namespace_store_test.go | 1 + .../store/etcd/resource_integration_test.go | 1 + backend/store/etcd/silenced_store_test.go | 1 + backend/store/etcd/store_test.go | 1 + backend/store/etcd/tessen_store_test.go | 1 + backend/store/etcd/user_store_test.go | 1 + backend/store/etcd/version_test.go | 1 + backend/store/etcd/watcher_test.go | 1 + backend/store/v2/etcdstore/store_test.go | 1 + backend/tessend/tessend_test.go | 1 + command/command_unix_test.go | 1 + command/command_windows_test.go | 1 + command/proc_group_unix.go | 1 + command/proc_unix.go | 1 + command/proc_windows.go | 1 + system/cpu_arm.go | 1 + system/cpu_other.go | 1 + util/environment/environment_posix.go | 1 + util/environment/environment_posix_test.go | 1 + util/environment/environment_windows.go | 1 + util/environment/environment_windows_test.go | 1 + 68 files changed, 85 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d62c5838fd..7cf5b77549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Removed unused rate limiting code in the liveness package. +- Include new Go 1.17+ build constraint syntax by running gofmt ## [6.6.1, 6.6.2] - 2021-11-29 diff --git a/agent/agent_test.go b/agent/agent_test.go index ac63da7dd8..a9ce1fae60 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package agent diff --git a/agent/check_handler_env_unix_test.go b/agent/check_handler_env_unix_test.go index 7b8f05a81d..907552f7f2 100644 --- a/agent/check_handler_env_unix_test.go +++ b/agent/check_handler_env_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package agent diff --git a/agent/check_handler_env_windows_test.go b/agent/check_handler_env_windows_test.go index 1b951af873..3d5864f988 100644 --- a/agent/check_handler_env_windows_test.go +++ b/agent/check_handler_env_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package agent diff --git a/agent/cmd/install_windows.go b/agent/cmd/install_windows.go index 58347bf1ae..85cb597e9e 100644 --- a/agent/cmd/install_windows.go +++ b/agent/cmd/install_windows.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build windows // +build windows package cmd diff --git a/agent/cmd/logger_unix.go b/agent/cmd/logger_unix.go index e116e7d18c..b692507181 100644 --- a/agent/cmd/logger_unix.go +++ b/agent/cmd/logger_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package cmd diff --git a/agent/cmd/windows.go b/agent/cmd/windows.go index b36bb2a8df..8d0fec4f79 100644 --- a/agent/cmd/windows.go +++ b/agent/cmd/windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package cmd diff --git a/agent/debug_test.go b/agent/debug_test.go index 8d192f78db..5ae22cde03 100644 --- a/agent/debug_test.go +++ b/agent/debug_test.go @@ -1,3 +1,4 @@ +//go:build !debug // +build !debug package agent diff --git a/agent/sockets_test.go b/agent/sockets_test.go index 08638c88f2..c0039cb476 100644 --- a/agent/sockets_test.go +++ b/agent/sockets_test.go @@ -39,9 +39,9 @@ func TestHandleTCPMessages(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", - Source: "proxyEnt", + Name: "app_01", + Output: "could not connect to something", + Source: "proxyEnt", Command: "command", } bytes, _ := json.Marshal(payload) @@ -92,9 +92,9 @@ func TestHandleTCPMessagesWithClient(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", - Client: "proxyEnt", + Name: "app_01", + Output: "could not connect to something", + Client: "proxyEnt", Command: "command", } bytes, _ := json.Marshal(payload) @@ -145,9 +145,9 @@ func TestHandleTCPMessagesWithAgent(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", - Source: cfg.AgentName, + Name: "app_01", + Output: "could not connect to something", + Source: cfg.AgentName, Command: "command", } bytes, _ := json.Marshal(payload) @@ -198,8 +198,8 @@ func TestHandleTCPMessagesNoSource(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", + Name: "app_01", + Output: "could not connect to something", Command: "command", } bytes, _ := json.Marshal(payload) @@ -251,9 +251,9 @@ func TestHandleUDPMessages(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", - Source: "proxyEnt", + Name: "app_01", + Output: "could not connect to something", + Source: "proxyEnt", Command: "command", } bytes, _ := json.Marshal(payload) @@ -349,9 +349,9 @@ func TestReceiveMultiWriteTCP(t *testing.T) { } payload := corev1.CheckResult{ - Name: "app_01", - Output: "could not connect to something", - Source: "proxyEnt", + Name: "app_01", + Output: "could not connect to something", + Source: "proxyEnt", Command: "command", } bytes, _ := json.Marshal(payload) diff --git a/agent/statsd_server.go b/agent/statsd_server.go index 10d2abe980..5dde301bca 100644 --- a/agent/statsd_server.go +++ b/agent/statsd_server.go @@ -1,3 +1,4 @@ +//go:build !solaris // +build !solaris // Package agent is the running Sensu agent. Agents connect to a Sensu backend, diff --git a/agent/statsd_server_test.go b/agent/statsd_server_test.go index 5e41c3300e..17b8e43b03 100644 --- a/agent/statsd_server_test.go +++ b/agent/statsd_server_test.go @@ -1,3 +1,4 @@ +//go:build integration && !solaris // +build integration,!solaris package agent diff --git a/asset/fetcher_unix.go b/asset/fetcher_unix.go index 9603dcc71c..21a21542b2 100644 --- a/asset/fetcher_unix.go +++ b/asset/fetcher_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package asset diff --git a/asset/fetcher_windows.go b/asset/fetcher_windows.go index 2e4d6625ce..f220e5a798 100644 --- a/asset/fetcher_windows.go +++ b/asset/fetcher_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package asset diff --git a/backend/apid/actions/actions_test.go b/backend/apid/actions/actions_test.go index d37f11b8a0..43b995818f 100644 --- a/backend/apid/actions/actions_test.go +++ b/backend/apid/actions/actions_test.go @@ -1,3 +1,4 @@ +//go:build !debug // +build !debug package actions diff --git a/backend/apid/handlers/patch_integration_test.go b/backend/apid/handlers/patch_integration_test.go index 905f8049a8..df713348b1 100644 --- a/backend/apid/handlers/patch_integration_test.go +++ b/backend/apid/handlers/patch_integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package handlers diff --git a/backend/backend_test.go b/backend/backend_test.go index cd2ee509dc..de265f0ece 100644 --- a/backend/backend_test.go +++ b/backend/backend_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package backend diff --git a/backend/cmd/logger_unix.go b/backend/cmd/logger_unix.go index e116e7d18c..b692507181 100644 --- a/backend/cmd/logger_unix.go +++ b/backend/cmd/logger_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package cmd diff --git a/backend/debug_test.go b/backend/debug_test.go index 99d22e432c..58d8cbc33a 100644 --- a/backend/debug_test.go +++ b/backend/debug_test.go @@ -1,3 +1,4 @@ +//go:build !debug // +build !debug package backend diff --git a/backend/etcd/etcd_test.go b/backend/etcd/etcd_test.go index 0e27816733..c89345a89b 100644 --- a/backend/etcd/etcd_test.go +++ b/backend/etcd/etcd_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/etcd/sequence_test.go b/backend/etcd/sequence_test.go index 893a59f77f..4a4d2c3e52 100644 --- a/backend/etcd/sequence_test.go +++ b/backend/etcd/sequence_test.go @@ -1,4 +1,5 @@ -//+build integration +//go:build integration +// +build integration package etcd diff --git a/backend/eventd/integration_test.go b/backend/eventd/integration_test.go index 13b9a75001..55ee179592 100644 --- a/backend/eventd/integration_test.go +++ b/backend/eventd/integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package eventd diff --git a/backend/eventd/logger_test.go b/backend/eventd/logger_test.go index 5fb33657fa..b851c4366d 100644 --- a/backend/eventd/logger_test.go +++ b/backend/eventd/logger_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package eventd diff --git a/backend/keepalived/integration_test.go b/backend/keepalived/integration_test.go index 14e84435c0..4f31d2cd2c 100644 --- a/backend/keepalived/integration_test.go +++ b/backend/keepalived/integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package keepalived diff --git a/backend/liveness/liveness_test.go b/backend/liveness/liveness_test.go index fcbabb4d47..aba601674a 100644 --- a/backend/liveness/liveness_test.go +++ b/backend/liveness/liveness_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package liveness diff --git a/backend/queue/queue_test.go b/backend/queue/queue_test.go index 6387a14881..f848c5defc 100644 --- a/backend/queue/queue_test.go +++ b/backend/queue/queue_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package queue diff --git a/backend/ringv2/pool_test.go b/backend/ringv2/pool_test.go index bcb92e7197..4ffe352a43 100644 --- a/backend/ringv2/pool_test.go +++ b/backend/ringv2/pool_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package ringv2 diff --git a/backend/ringv2/ringv2_test.go b/backend/ringv2/ringv2_test.go index 34f763b9dd..98536026bf 100644 --- a/backend/ringv2/ringv2_test.go +++ b/backend/ringv2/ringv2_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race // These tests are unfortunately quite slow. This is somewhat mitigated by the diff --git a/backend/schedulerd/check_watcher_test.go b/backend/schedulerd/check_watcher_test.go index 0faa813a03..39da188e8d 100644 --- a/backend/schedulerd/check_watcher_test.go +++ b/backend/schedulerd/check_watcher_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package schedulerd diff --git a/backend/schedulerd/debug_test.go b/backend/schedulerd/debug_test.go index 6f4adaf86e..dd529a3c96 100644 --- a/backend/schedulerd/debug_test.go +++ b/backend/schedulerd/debug_test.go @@ -1,3 +1,4 @@ +//go:build !debug // +build !debug package schedulerd diff --git a/backend/schedulerd/executor_test.go b/backend/schedulerd/executor_test.go index 8dd7bfe72a..6dcffc1833 100644 --- a/backend/schedulerd/executor_test.go +++ b/backend/schedulerd/executor_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package schedulerd diff --git a/backend/schedulerd/schedulerd_test.go b/backend/schedulerd/schedulerd_test.go index 0f61544976..705425b7ee 100644 --- a/backend/schedulerd/schedulerd_test.go +++ b/backend/schedulerd/schedulerd_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package schedulerd diff --git a/backend/store/cache/cache_integration_test.go b/backend/store/cache/cache_integration_test.go index bd89139272..394e7d8bc9 100644 --- a/backend/store/cache/cache_integration_test.go +++ b/backend/store/cache/cache_integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package cache diff --git a/backend/store/cache/v2/cache_integration_test.go b/backend/store/cache/v2/cache_integration_test.go index 39034b882a..2ba08253d6 100644 --- a/backend/store/cache/v2/cache_integration_test.go +++ b/backend/store/cache/v2/cache_integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package v2 diff --git a/backend/store/etcd/asset_store_test.go b/backend/store/etcd/asset_store_test.go index bcf4d9f2e6..fb12e8c064 100644 --- a/backend/store/etcd/asset_store_test.go +++ b/backend/store/etcd/asset_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/authentication_test.go b/backend/store/etcd/authentication_test.go index 67e2265741..a107baa63e 100644 --- a/backend/store/etcd/authentication_test.go +++ b/backend/store/etcd/authentication_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/check_store_test.go b/backend/store/etcd/check_store_test.go index c99378819d..153b49c9df 100644 --- a/backend/store/etcd/check_store_test.go +++ b/backend/store/etcd/check_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/cluster_id_store_test.go b/backend/store/etcd/cluster_id_store_test.go index b94949be54..904c1d7d4c 100644 --- a/backend/store/etcd/cluster_id_store_test.go +++ b/backend/store/etcd/cluster_id_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/debug_test.go b/backend/store/etcd/debug_test.go index 52fd0cc746..1f95083cba 100644 --- a/backend/store/etcd/debug_test.go +++ b/backend/store/etcd/debug_test.go @@ -1,3 +1,4 @@ +//go:build !debug // +build !debug package etcd diff --git a/backend/store/etcd/entity_store_test.go b/backend/store/etcd/entity_store_test.go index 64a028ce3d..d81ce37f31 100644 --- a/backend/store/etcd/entity_store_test.go +++ b/backend/store/etcd/entity_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/event_store_integration_test.go b/backend/store/etcd/event_store_integration_test.go index 87229502db..c224f28cec 100644 --- a/backend/store/etcd/event_store_integration_test.go +++ b/backend/store/etcd/event_store_integration_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/filter_store_test.go b/backend/store/etcd/filter_store_test.go index b4e88cef44..dcfeda07cf 100644 --- a/backend/store/etcd/filter_store_test.go +++ b/backend/store/etcd/filter_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/handler_store_test.go b/backend/store/etcd/handler_store_test.go index 87121ca27e..a91f64f1fa 100644 --- a/backend/store/etcd/handler_store_test.go +++ b/backend/store/etcd/handler_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/health_store_test.go b/backend/store/etcd/health_store_test.go index 9573670deb..7b1e42752e 100644 --- a/backend/store/etcd/health_store_test.go +++ b/backend/store/etcd/health_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/hook_store_test.go b/backend/store/etcd/hook_store_test.go index 336e6e8961..791a11c31d 100644 --- a/backend/store/etcd/hook_store_test.go +++ b/backend/store/etcd/hook_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/keepalive_store_test.go b/backend/store/etcd/keepalive_store_test.go index 62dd777326..ac492ebd51 100644 --- a/backend/store/etcd/keepalive_store_test.go +++ b/backend/store/etcd/keepalive_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/migrations_test.go b/backend/store/etcd/migrations_test.go index bd78d4a8b8..f4b35ecf99 100644 --- a/backend/store/etcd/migrations_test.go +++ b/backend/store/etcd/migrations_test.go @@ -1,3 +1,4 @@ +//go:build !race && integration // +build !race,integration package etcd diff --git a/backend/store/etcd/mutator_store_test.go b/backend/store/etcd/mutator_store_test.go index c0bd6d18b7..e04fd8fef0 100644 --- a/backend/store/etcd/mutator_store_test.go +++ b/backend/store/etcd/mutator_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/namespace_store_test.go b/backend/store/etcd/namespace_store_test.go index 4cc3d66078..7e5720f2e1 100644 --- a/backend/store/etcd/namespace_store_test.go +++ b/backend/store/etcd/namespace_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/resource_integration_test.go b/backend/store/etcd/resource_integration_test.go index d1baff3abd..a7ad3f8e3b 100644 --- a/backend/store/etcd/resource_integration_test.go +++ b/backend/store/etcd/resource_integration_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/silenced_store_test.go b/backend/store/etcd/silenced_store_test.go index ff842159ed..2fd687b0b1 100644 --- a/backend/store/etcd/silenced_store_test.go +++ b/backend/store/etcd/silenced_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/store_test.go b/backend/store/etcd/store_test.go index 313e3034af..49c79bea3f 100644 --- a/backend/store/etcd/store_test.go +++ b/backend/store/etcd/store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/tessen_store_test.go b/backend/store/etcd/tessen_store_test.go index 424e21f621..5d2ad732c5 100644 --- a/backend/store/etcd/tessen_store_test.go +++ b/backend/store/etcd/tessen_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/user_store_test.go b/backend/store/etcd/user_store_test.go index 41baf3cb09..d56f3cc979 100644 --- a/backend/store/etcd/user_store_test.go +++ b/backend/store/etcd/user_store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/version_test.go b/backend/store/etcd/version_test.go index 2c43577eb2..809ee579c0 100644 --- a/backend/store/etcd/version_test.go +++ b/backend/store/etcd/version_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/etcd/watcher_test.go b/backend/store/etcd/watcher_test.go index 8c61c0d4a6..52ad29ffe2 100644 --- a/backend/store/etcd/watcher_test.go +++ b/backend/store/etcd/watcher_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcd diff --git a/backend/store/v2/etcdstore/store_test.go b/backend/store/v2/etcdstore/store_test.go index 738c03d2bd..5106aa1a5e 100644 --- a/backend/store/v2/etcdstore/store_test.go +++ b/backend/store/v2/etcdstore/store_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package etcdstore_test diff --git a/backend/tessend/tessend_test.go b/backend/tessend/tessend_test.go index 06ce8844fe..b93b8de20c 100644 --- a/backend/tessend/tessend_test.go +++ b/backend/tessend/tessend_test.go @@ -1,3 +1,4 @@ +//go:build integration && !race // +build integration,!race package tessend diff --git a/command/command_unix_test.go b/command/command_unix_test.go index 478a8a6189..af855f9bd5 100644 --- a/command/command_unix_test.go +++ b/command/command_unix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package command diff --git a/command/command_windows_test.go b/command/command_windows_test.go index cdc345db66..c4e68da626 100644 --- a/command/command_windows_test.go +++ b/command/command_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package command diff --git a/command/proc_group_unix.go b/command/proc_group_unix.go index 16cc459d61..d2a974ee55 100644 --- a/command/proc_group_unix.go +++ b/command/proc_group_unix.go @@ -1,3 +1,4 @@ +//go:build !linux && !windows // +build !linux,!windows package command diff --git a/command/proc_unix.go b/command/proc_unix.go index 45abf92972..ad0575a62d 100644 --- a/command/proc_unix.go +++ b/command/proc_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package command diff --git a/command/proc_windows.go b/command/proc_windows.go index 605df44ea6..71c47fd9c3 100644 --- a/command/proc_windows.go +++ b/command/proc_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package command diff --git a/system/cpu_arm.go b/system/cpu_arm.go index 8d6c3fb11c..75a3fa0ad0 100644 --- a/system/cpu_arm.go +++ b/system/cpu_arm.go @@ -1,3 +1,4 @@ +//go:build arm // +build arm package system diff --git a/system/cpu_other.go b/system/cpu_other.go index 70be409c57..4eb42a5869 100644 --- a/system/cpu_other.go +++ b/system/cpu_other.go @@ -1,3 +1,4 @@ +//go:build !arm // +build !arm package system diff --git a/util/environment/environment_posix.go b/util/environment/environment_posix.go index b98b2e79b8..65051f5399 100644 --- a/util/environment/environment_posix.go +++ b/util/environment/environment_posix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package environment diff --git a/util/environment/environment_posix_test.go b/util/environment/environment_posix_test.go index 312ffbbe13..d3093a2633 100644 --- a/util/environment/environment_posix_test.go +++ b/util/environment/environment_posix_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package environment diff --git a/util/environment/environment_windows.go b/util/environment/environment_windows.go index bfbb669029..8a4ad40e6c 100644 --- a/util/environment/environment_windows.go +++ b/util/environment/environment_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package environment diff --git a/util/environment/environment_windows_test.go b/util/environment/environment_windows_test.go index 49444a7fe0..6ebde9e90b 100644 --- a/util/environment/environment_windows_test.go +++ b/util/environment/environment_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package environment