From d55f3123d448d66223e5abaee42e9ed785cd8d31 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Fri, 30 Jun 2023 21:44:02 +0100 Subject: [PATCH] go: go fix with 1.18 Apply `go fix ./...` to the whole code base using go-1.18 to remove old build tags. --- asserts/sysdb/staging.go | 1 - asserts/sysdb/testkeys.go | 1 - bootloader/assets/assetstesting.go | 1 - bootloader/withbootassettesting.go | 1 - bootloader/withbootassettesting_test.go | 1 - cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go | 1 - cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go | 1 - cmd/snap-repair/staging.go | 1 - cmd/snap-repair/testkeys.go | 1 - cmd/snap-seccomp/main_nonriscv64.go | 1 - cmd/snap-seccomp/main_ppc64le.go | 1 - cmd/snap-seccomp/main_riscv64.go | 1 - cmd/snap-seccomp/old_seccomp.go | 1 - cmd/snap-update-ns/bootstrap_ppc64le.go | 1 - cmd/snap/cmd_userd.go | 1 - cmd/snap/cmd_userd_test.go | 1 - cmd/snap/cmd_version_other.go | 1 - gadget/install/encrypt.go | 1 - gadget/install/encrypt_test.go | 1 - gadget/install/export_secboot_test.go | 1 - gadget/install/install.go | 1 - gadget/install/install_dummy.go | 1 - gadget/install/install_test.go | 1 - gadget/install/mount_other.go | 1 - image/preseed/preseed_other.go | 1 - osutil/chattr_32.go | 1 - osutil/chattr_64.go | 1 - osutil/cp_other.go | 1 - osutil/export_fault_test.go | 1 - osutil/faultinject.go | 1 - osutil/faultinject_fake.go | 1 - osutil/faultinject_fake_test.go | 1 - osutil/faultinject_test.go | 1 - osutil/group_cgo.go | 1 - osutil/group_no_cgo.go | 1 - osutil/inotify/inotify_linux.go | 1 - osutil/inotify/inotify_linux_test.go | 1 - osutil/inotify/inotify_others.go | 1 - osutil/settime_32bit.go | 2 -- osutil/settime_64bit.go | 1 - osutil/sys/sysnum_16_linux.go | 1 - osutil/sys/sysnum_32_linux.go | 1 - osutil/udev/netlink/rawsockstop_other.go | 1 - overlord/configstate/configcore/certs.go | 1 - overlord/configstate/configcore/certs_test.go | 1 - overlord/configstate/configcore/cloud.go | 1 - overlord/configstate/configcore/cloud_test.go | 1 - overlord/configstate/configcore/early_test.go | 1 - overlord/configstate/configcore/export_runwithstate_test.go | 1 - overlord/configstate/configcore/kernel.go | 1 - overlord/configstate/configcore/netplan.go | 1 - overlord/configstate/configcore/netplan_test.go | 1 - overlord/configstate/configcore/proxy.go | 1 - overlord/configstate/configcore/proxy_test.go | 1 - overlord/configstate/configcore/refresh.go | 1 - overlord/configstate/configcore/refresh_test.go | 1 - overlord/configstate/configcore/runwithstate.go | 1 - overlord/configstate/configcore/runwithstate_test.go | 1 - overlord/configstate/configcore/snapshots.go | 1 - overlord/configstate/configcore/snapshots_test.go | 1 - overlord/configstate/configcore/users.go | 1 - overlord/configstate/configcore/users_test.go | 1 - overlord/configstate/configcore/vitality.go | 1 - overlord/configstate/configcore/vitality_test.go | 1 - overlord/configstate/configmgr.go | 1 - overlord/configstate/configstate.go | 1 - overlord/configstate/configstate_test.go | 1 - overlord/configstate/export_test.go | 1 - overlord/configstate/handler_test.go | 1 - overlord/devicestate/devicestate_install_api_test.go | 1 - overlord/overlord.go | 1 - polkit/pid_start_time.go | 1 - polkit/pid_start_time_test.go | 1 - secboot/encrypt_dummy.go | 1 - secboot/encrypt_sb.go | 1 - secboot/encrypt_sb_test.go | 1 - secboot/export_sb_test.go | 1 - secboot/keys/keys_dummy.go | 1 - secboot/keys/keys_sb.go | 1 - secboot/secboot_dummy.go | 1 - secboot/secboot_hooks.go | 1 - secboot/secboot_sb.go | 1 - secboot/secboot_sb_test.go | 1 - secboot/secboot_tpm.go | 1 - snapdenv/withtestkeys.go | 1 - snapdtool/tool_other.go | 1 - strutil/ctrl16.go | 1 - strutil/ctrl17.go | 1 - tests/nested/manual/core20-da-lockout/getdalockout.go | 1 - tests/nested/manual/core20-da-lockout/getdalockout_nosecboot.go | 1 - 90 files changed, 91 deletions(-) diff --git a/asserts/sysdb/staging.go b/asserts/sysdb/staging.go index 78e9472d786..ff196e69987 100644 --- a/asserts/sysdb/staging.go +++ b/asserts/sysdb/staging.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withtestkeys || withstagingkeys -// +build withtestkeys withstagingkeys /* * Copyright (C) 2016 Canonical Ltd diff --git a/asserts/sysdb/testkeys.go b/asserts/sysdb/testkeys.go index 09a0f49793f..1d77bde8e48 100644 --- a/asserts/sysdb/testkeys.go +++ b/asserts/sysdb/testkeys.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withtestkeys -// +build withtestkeys /* * Copyright (C) 2016 Canonical Ltd diff --git a/bootloader/assets/assetstesting.go b/bootloader/assets/assetstesting.go index ea77045d433..cdcbcd0a756 100644 --- a/bootloader/assets/assetstesting.go +++ b/bootloader/assets/assetstesting.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withbootassetstesting -// +build withbootassetstesting /* * Copyright (C) 2021 Canonical Ltd diff --git a/bootloader/withbootassettesting.go b/bootloader/withbootassettesting.go index 3d20f87b717..78559ddca0e 100644 --- a/bootloader/withbootassettesting.go +++ b/bootloader/withbootassettesting.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withbootassetstesting -// +build withbootassetstesting /* * Copyright (C) 2021 Canonical Ltd diff --git a/bootloader/withbootassettesting_test.go b/bootloader/withbootassettesting_test.go index 587c9646ff0..1a365c202ab 100644 --- a/bootloader/withbootassettesting_test.go +++ b/bootloader/withbootassettesting_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withbootassetstesting -// +build withbootassetstesting /* * Copyright (C) 2021 Canonical Ltd diff --git a/cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go b/cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go index 8e87defd83a..640063d1bb1 100644 --- a/cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go +++ b/cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build nosecboot -// +build nosecboot /* * Copyright (C) 2019-2020 Canonical Ltd diff --git a/cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go b/cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go index 795d3cd16b2..1a30006bb28 100644 --- a/cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go +++ b/cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2019-2020 Canonical Ltd diff --git a/cmd/snap-repair/staging.go b/cmd/snap-repair/staging.go index 61522400551..71b2e6a473d 100644 --- a/cmd/snap-repair/staging.go +++ b/cmd/snap-repair/staging.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withtestkeys || withstagingkeys -// +build withtestkeys withstagingkeys /* * Copyright (C) 2017-2020 Canonical Ltd diff --git a/cmd/snap-repair/testkeys.go b/cmd/snap-repair/testkeys.go index b598c425295..730bb79f6a8 100644 --- a/cmd/snap-repair/testkeys.go +++ b/cmd/snap-repair/testkeys.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withtestkeys -// +build withtestkeys /* * Copyright (C) 2021 Canonical Ltd diff --git a/cmd/snap-seccomp/main_nonriscv64.go b/cmd/snap-seccomp/main_nonriscv64.go index e3690d079d6..8ebd2924368 100644 --- a/cmd/snap-seccomp/main_nonriscv64.go +++ b/cmd/snap-seccomp/main_nonriscv64.go @@ -1,7 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- // //go:build !riscv64 -// +build !riscv64 /* * Copyright (C) 2021 Canonical Ltd diff --git a/cmd/snap-seccomp/main_ppc64le.go b/cmd/snap-seccomp/main_ppc64le.go index d719b1402f7..441eb7a1917 100644 --- a/cmd/snap-seccomp/main_ppc64le.go +++ b/cmd/snap-seccomp/main_ppc64le.go @@ -1,7 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- // //go:build ppc64le && go1.7 && !go1.8 -// +build ppc64le,go1.7,!go1.8 /* * Copyright (C) 2017 Canonical Ltd diff --git a/cmd/snap-seccomp/main_riscv64.go b/cmd/snap-seccomp/main_riscv64.go index ca78eddf6f6..28370f6d917 100644 --- a/cmd/snap-seccomp/main_riscv64.go +++ b/cmd/snap-seccomp/main_riscv64.go @@ -1,7 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- // //go:build riscv64 -// +build riscv64 /* * Copyright (C) 2021 Canonical Ltd diff --git a/cmd/snap-seccomp/old_seccomp.go b/cmd/snap-seccomp/old_seccomp.go index a053dceb822..c41ee901a78 100644 --- a/cmd/snap-seccomp/old_seccomp.go +++ b/cmd/snap-seccomp/old_seccomp.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build oldseccomp -// +build oldseccomp /* * Copyright (C) 2021 Canonical Ltd diff --git a/cmd/snap-update-ns/bootstrap_ppc64le.go b/cmd/snap-update-ns/bootstrap_ppc64le.go index d719b1402f7..441eb7a1917 100644 --- a/cmd/snap-update-ns/bootstrap_ppc64le.go +++ b/cmd/snap-update-ns/bootstrap_ppc64le.go @@ -1,7 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- // //go:build ppc64le && go1.7 && !go1.8 -// +build ppc64le,go1.7,!go1.8 /* * Copyright (C) 2017 Canonical Ltd diff --git a/cmd/snap/cmd_userd.go b/cmd/snap/cmd_userd.go index d7aff36a384..9882e9d9514 100644 --- a/cmd/snap/cmd_userd.go +++ b/cmd/snap/cmd_userd.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !darwin -// +build !darwin /* * Copyright (C) 2017-2022 Canonical Ltd diff --git a/cmd/snap/cmd_userd_test.go b/cmd/snap/cmd_userd_test.go index a8129c9a129..fc375a62b28 100644 --- a/cmd/snap/cmd_userd_test.go +++ b/cmd/snap/cmd_userd_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !darwin -// +build !darwin /* * Copyright (C) 2016-2022 Canonical Ltd diff --git a/cmd/snap/cmd_version_other.go b/cmd/snap/cmd_version_other.go index 2204cfdc258..078dfbb56a1 100644 --- a/cmd/snap/cmd_version_other.go +++ b/cmd/snap/cmd_version_other.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !linux -// +build !linux /* * Copyright (C) 2016 Canonical Ltd diff --git a/gadget/install/encrypt.go b/gadget/install/encrypt.go index 13bbc48f56f..14296620a34 100644 --- a/gadget/install/encrypt.go +++ b/gadget/install/encrypt.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2020 Canonical Ltd diff --git a/gadget/install/encrypt_test.go b/gadget/install/encrypt_test.go index 931eaee0ea1..556f542a963 100644 --- a/gadget/install/encrypt_test.go +++ b/gadget/install/encrypt_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2020 Canonical Ltd diff --git a/gadget/install/export_secboot_test.go b/gadget/install/export_secboot_test.go index cdfbbfeae5f..101bc347fa5 100644 --- a/gadget/install/export_secboot_test.go +++ b/gadget/install/export_secboot_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2020 Canonical Ltd diff --git a/gadget/install/install.go b/gadget/install/install.go index 2bca3c08dc0..057add93988 100644 --- a/gadget/install/install.go +++ b/gadget/install/install.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2019-2020 Canonical Ltd diff --git a/gadget/install/install_dummy.go b/gadget/install/install_dummy.go index a033b165fab..c987fd5a058 100644 --- a/gadget/install/install_dummy.go +++ b/gadget/install/install_dummy.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build nosecboot -// +build nosecboot /* * Copyright (C) 2019-2020 Canonical Ltd diff --git a/gadget/install/install_test.go b/gadget/install/install_test.go index a02c58364b6..c89fa4406ab 100644 --- a/gadget/install/install_test.go +++ b/gadget/install/install_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2019-2022 Canonical Ltd diff --git a/gadget/install/mount_other.go b/gadget/install/mount_other.go index c3ec6022c89..4dae3c5aeff 100644 --- a/gadget/install/mount_other.go +++ b/gadget/install/mount_other.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !linux -// +build !linux /* * Copyright (C) 2020 Canonical Ltd diff --git a/image/preseed/preseed_other.go b/image/preseed/preseed_other.go index 16da7e1f57a..a0dfb805050 100644 --- a/image/preseed/preseed_other.go +++ b/image/preseed/preseed_other.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !linux -// +build !linux /* * Copyright (C) 2019-2022 Canonical Ltd diff --git a/osutil/chattr_32.go b/osutil/chattr_32.go index 96b9ee2560f..a3fa56e43cf 100644 --- a/osutil/chattr_32.go +++ b/osutil/chattr_32.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build arm || 386 || ppc -// +build arm 386 ppc /* * Copyright (C) 2016 Canonical Ltd diff --git a/osutil/chattr_64.go b/osutil/chattr_64.go index e9f5a8a6751..d6d9fc4c2e6 100644 --- a/osutil/chattr_64.go +++ b/osutil/chattr_64.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build amd64 || arm64 || ppc64le || riscv64 || s390x -// +build amd64 arm64 ppc64le riscv64 s390x /* * Copyright (C) 2016 Canonical Ltd diff --git a/osutil/cp_other.go b/osutil/cp_other.go index b36d08de44f..7f7a4419002 100644 --- a/osutil/cp_other.go +++ b/osutil/cp_other.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !linux -// +build !linux /* * Copyright (C) 2014-2015 Canonical Ltd diff --git a/osutil/export_fault_test.go b/osutil/export_fault_test.go index fd12be7759c..46f873c69c1 100644 --- a/osutil/export_fault_test.go +++ b/osutil/export_fault_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build faultinject -// +build faultinject /* * Copyright (C) 2016 Canonical Ltd diff --git a/osutil/faultinject.go b/osutil/faultinject.go index 691e1d48e55..e2c0df39137 100644 --- a/osutil/faultinject.go +++ b/osutil/faultinject.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build faultinject -// +build faultinject /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/faultinject_fake.go b/osutil/faultinject_fake.go index afe27c3557a..ca36e1a9b4a 100644 --- a/osutil/faultinject_fake.go +++ b/osutil/faultinject_fake.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !faultinject -// +build !faultinject /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/faultinject_fake_test.go b/osutil/faultinject_fake_test.go index c45f10cb1b4..323ae9041a5 100644 --- a/osutil/faultinject_fake_test.go +++ b/osutil/faultinject_fake_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !faultinject -// +build !faultinject /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/faultinject_test.go b/osutil/faultinject_test.go index ff299a936b3..0dba19237ac 100644 --- a/osutil/faultinject_test.go +++ b/osutil/faultinject_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build faultinject -// +build faultinject /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/group_cgo.go b/osutil/group_cgo.go index 1d00b454c50..257f9e551a5 100644 --- a/osutil/group_cgo.go +++ b/osutil/group_cgo.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build cgo -// +build cgo /* * Copyright (C) 2017-2019 Canonical Ltd diff --git a/osutil/group_no_cgo.go b/osutil/group_no_cgo.go index 8d18cf2acd1..acba6dae3d8 100644 --- a/osutil/group_no_cgo.go +++ b/osutil/group_no_cgo.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !cgo -// +build !cgo package osutil diff --git a/osutil/inotify/inotify_linux.go b/osutil/inotify/inotify_linux.go index 1eea9af2c92..bc010e35240 100644 --- a/osutil/inotify/inotify_linux.go +++ b/osutil/inotify/inotify_linux.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/osutil/inotify/inotify_linux_test.go b/osutil/inotify/inotify_linux_test.go index 0e56f16e27a..09ca850f68c 100644 --- a/osutil/inotify/inotify_linux_test.go +++ b/osutil/inotify/inotify_linux_test.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/osutil/inotify/inotify_others.go b/osutil/inotify/inotify_others.go index 3364d8dfda4..f94fd55b9b3 100644 --- a/osutil/inotify/inotify_others.go +++ b/osutil/inotify/inotify_others.go @@ -1,5 +1,4 @@ //go:build !linux -// +build !linux /* Copyright 2020 The Kubernetes Authors. diff --git a/osutil/settime_32bit.go b/osutil/settime_32bit.go index 42ee0cf6e9c..770447da43a 100644 --- a/osutil/settime_32bit.go +++ b/osutil/settime_32bit.go @@ -1,8 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build (386 || arm) && linux -// +build 386 arm -// +build linux /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/settime_64bit.go b/osutil/settime_64bit.go index 665b785b22b..22dc72971ed 100644 --- a/osutil/settime_64bit.go +++ b/osutil/settime_64bit.go @@ -1,7 +1,6 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !386 && !arm && linux -// +build !386,!arm,linux /* * Copyright (C) 2021 Canonical Ltd diff --git a/osutil/sys/sysnum_16_linux.go b/osutil/sys/sysnum_16_linux.go index dd425854b6d..825e76a8b79 100644 --- a/osutil/sys/sysnum_16_linux.go +++ b/osutil/sys/sysnum_16_linux.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build arm || 386 -// +build arm 386 /* * Copyright (C) 2017 Canonical Ltd diff --git a/osutil/sys/sysnum_32_linux.go b/osutil/sys/sysnum_32_linux.go index f2258e66784..04f0233ff1a 100644 --- a/osutil/sys/sysnum_32_linux.go +++ b/osutil/sys/sysnum_32_linux.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build amd64 || arm64 || ppc || ppc64le || riscv64 || s390x -// +build amd64 arm64 ppc ppc64le riscv64 s390x /* * Copyright (C) 2017 Canonical Ltd diff --git a/osutil/udev/netlink/rawsockstop_other.go b/osutil/udev/netlink/rawsockstop_other.go index 8d9ce415796..d53df98ed5a 100644 --- a/osutil/udev/netlink/rawsockstop_other.go +++ b/osutil/udev/netlink/rawsockstop_other.go @@ -1,5 +1,4 @@ //go:build !arm64 -// +build !arm64 // don't remove the newline between the above statement and the package statement // or else the build constraint will be ignored and assumed to be part of the package comment! diff --git a/overlord/configstate/configcore/certs.go b/overlord/configstate/configcore/certs.go index 6fe26e62655..b655cfa1f1a 100644 --- a/overlord/configstate/configcore/certs.go +++ b/overlord/configstate/configcore/certs.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2020 Canonical Ltd diff --git a/overlord/configstate/configcore/certs_test.go b/overlord/configstate/configcore/certs_test.go index 00a99274c5c..dbbd9aecce0 100644 --- a/overlord/configstate/configcore/certs_test.go +++ b/overlord/configstate/configcore/certs_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2020 Canonical Ltd diff --git a/overlord/configstate/configcore/cloud.go b/overlord/configstate/configcore/cloud.go index bfa6eb7c717..68f33a6161e 100644 --- a/overlord/configstate/configcore/cloud.go +++ b/overlord/configstate/configcore/cloud.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2018 Canonical Ltd diff --git a/overlord/configstate/configcore/cloud_test.go b/overlord/configstate/configcore/cloud_test.go index e0294d323b5..3105538eaf0 100644 --- a/overlord/configstate/configcore/cloud_test.go +++ b/overlord/configstate/configcore/cloud_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2018 Canonical Ltd diff --git a/overlord/configstate/configcore/early_test.go b/overlord/configstate/configcore/early_test.go index 032aa063aed..2c8071570c7 100644 --- a/overlord/configstate/configcore/early_test.go +++ b/overlord/configstate/configcore/early_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2021 Canonical Ltd diff --git a/overlord/configstate/configcore/export_runwithstate_test.go b/overlord/configstate/configcore/export_runwithstate_test.go index 1501fa11e16..8928a02406d 100644 --- a/overlord/configstate/configcore/export_runwithstate_test.go +++ b/overlord/configstate/configcore/export_runwithstate_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2023 Canonical Ltd diff --git a/overlord/configstate/configcore/kernel.go b/overlord/configstate/configcore/kernel.go index 5efab2d13db..3c53a6e7cf5 100644 --- a/overlord/configstate/configcore/kernel.go +++ b/overlord/configstate/configcore/kernel.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2023 Canonical Ltd diff --git a/overlord/configstate/configcore/netplan.go b/overlord/configstate/configcore/netplan.go index b473c86b77f..cee628db201 100644 --- a/overlord/configstate/configcore/netplan.go +++ b/overlord/configstate/configcore/netplan.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2021 Canonical Ltd diff --git a/overlord/configstate/configcore/netplan_test.go b/overlord/configstate/configcore/netplan_test.go index 6de6af8d571..5ae4120463e 100644 --- a/overlord/configstate/configcore/netplan_test.go +++ b/overlord/configstate/configcore/netplan_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2021 Canonical Ltd diff --git a/overlord/configstate/configcore/proxy.go b/overlord/configstate/configcore/proxy.go index 765e3951e49..27336ef4ae1 100644 --- a/overlord/configstate/configcore/proxy.go +++ b/overlord/configstate/configcore/proxy.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2017-2022 Canonical Ltd diff --git a/overlord/configstate/configcore/proxy_test.go b/overlord/configstate/configcore/proxy_test.go index aa8cbf4ec65..f37ae36b9fc 100644 --- a/overlord/configstate/configcore/proxy_test.go +++ b/overlord/configstate/configcore/proxy_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2017-2022 Canonical Ltd diff --git a/overlord/configstate/configcore/refresh.go b/overlord/configstate/configcore/refresh.go index 0bc9f2333f0..4de64c43289 100644 --- a/overlord/configstate/configcore/refresh.go +++ b/overlord/configstate/configcore/refresh.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2017-2022 Canonical Ltd diff --git a/overlord/configstate/configcore/refresh_test.go b/overlord/configstate/configcore/refresh_test.go index 8b44d8e4794..375783e3b03 100644 --- a/overlord/configstate/configcore/refresh_test.go +++ b/overlord/configstate/configcore/refresh_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2017-2018 Canonical Ltd diff --git a/overlord/configstate/configcore/runwithstate.go b/overlord/configstate/configcore/runwithstate.go index 0f1ab1ceeb8..258f6e77a45 100644 --- a/overlord/configstate/configcore/runwithstate.go +++ b/overlord/configstate/configcore/runwithstate.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2020-2022 Canonical Ltd diff --git a/overlord/configstate/configcore/runwithstate_test.go b/overlord/configstate/configcore/runwithstate_test.go index f22903e6f19..89ffb9ac514 100644 --- a/overlord/configstate/configcore/runwithstate_test.go +++ b/overlord/configstate/configcore/runwithstate_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2023 Canonical Ltd diff --git a/overlord/configstate/configcore/snapshots.go b/overlord/configstate/configcore/snapshots.go index 1c1acbae2b1..1b8c096e70f 100644 --- a/overlord/configstate/configcore/snapshots.go +++ b/overlord/configstate/configcore/snapshots.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2019 Canonical Ltd diff --git a/overlord/configstate/configcore/snapshots_test.go b/overlord/configstate/configcore/snapshots_test.go index 166c8921edd..8cb26a3ee6f 100644 --- a/overlord/configstate/configcore/snapshots_test.go +++ b/overlord/configstate/configcore/snapshots_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2019 Canonical Ltd diff --git a/overlord/configstate/configcore/users.go b/overlord/configstate/configcore/users.go index b127f87d139..4803b9d401e 100644 --- a/overlord/configstate/configcore/users.go +++ b/overlord/configstate/configcore/users.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2021 Canonical Ltd diff --git a/overlord/configstate/configcore/users_test.go b/overlord/configstate/configcore/users_test.go index dc8f66f0e88..7d2b325653d 100644 --- a/overlord/configstate/configcore/users_test.go +++ b/overlord/configstate/configcore/users_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2021 Canonical Ltd diff --git a/overlord/configstate/configcore/vitality.go b/overlord/configstate/configcore/vitality.go index 0966b4b8ddc..296d16ccfac 100644 --- a/overlord/configstate/configcore/vitality.go +++ b/overlord/configstate/configcore/vitality.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2020 Canonical Ltd diff --git a/overlord/configstate/configcore/vitality_test.go b/overlord/configstate/configcore/vitality_test.go index d532b838a1a..b47fa3587a1 100644 --- a/overlord/configstate/configcore/vitality_test.go +++ b/overlord/configstate/configcore/vitality_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2020 Canonical Ltd diff --git a/overlord/configstate/configmgr.go b/overlord/configstate/configmgr.go index d1d7d3db211..bd2d81b7369 100644 --- a/overlord/configstate/configmgr.go +++ b/overlord/configstate/configmgr.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016-2017 Canonical Ltd diff --git a/overlord/configstate/configstate.go b/overlord/configstate/configstate.go index 67ad3ec5943..9133fb70b8e 100644 --- a/overlord/configstate/configstate.go +++ b/overlord/configstate/configstate.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016 Canonical Ltd diff --git a/overlord/configstate/configstate_test.go b/overlord/configstate/configstate_test.go index 50771c5a866..d38d01499cc 100644 --- a/overlord/configstate/configstate_test.go +++ b/overlord/configstate/configstate_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016 Canonical Ltd diff --git a/overlord/configstate/export_test.go b/overlord/configstate/export_test.go index f405eb69259..6d3bca865f8 100644 --- a/overlord/configstate/export_test.go +++ b/overlord/configstate/export_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016 Canonical Ltd diff --git a/overlord/configstate/handler_test.go b/overlord/configstate/handler_test.go index ab50cb197c1..d49da92a4bc 100644 --- a/overlord/configstate/handler_test.go +++ b/overlord/configstate/handler_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016 Canonical Ltd diff --git a/overlord/devicestate/devicestate_install_api_test.go b/overlord/devicestate/devicestate_install_api_test.go index 73957f6d812..8a0ee314240 100644 --- a/overlord/devicestate/devicestate_install_api_test.go +++ b/overlord/devicestate/devicestate_install_api_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/overlord/overlord.go b/overlord/overlord.go index 965966b6277..9a5d8e34109 100644 --- a/overlord/overlord.go +++ b/overlord/overlord.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nomanagers -// +build !nomanagers /* * Copyright (C) 2016-2022 Canonical Ltd diff --git a/polkit/pid_start_time.go b/polkit/pid_start_time.go index f3e39199e83..9ceaf95bfcf 100644 --- a/polkit/pid_start_time.go +++ b/polkit/pid_start_time.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build linux -// +build linux /* * Copyright (C) 2017 Canonical Ltd diff --git a/polkit/pid_start_time_test.go b/polkit/pid_start_time_test.go index dad807bc7a5..575cb67ff0f 100644 --- a/polkit/pid_start_time_test.go +++ b/polkit/pid_start_time_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build linux -// +build linux /* * Copyright (C) 2017 Canonical Ltd diff --git a/secboot/encrypt_dummy.go b/secboot/encrypt_dummy.go index d36a809dcad..f4c4f1ca55b 100644 --- a/secboot/encrypt_dummy.go +++ b/secboot/encrypt_dummy.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build nosecboot -// +build nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/secboot/encrypt_sb.go b/secboot/encrypt_sb.go index 88fa512ebb1..e04773dac93 100644 --- a/secboot/encrypt_sb.go +++ b/secboot/encrypt_sb.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/secboot/encrypt_sb_test.go b/secboot/encrypt_sb_test.go index 9ef73f5c6ca..9a7797b2a3d 100644 --- a/secboot/encrypt_sb_test.go +++ b/secboot/encrypt_sb_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/secboot/export_sb_test.go b/secboot/export_sb_test.go index 4dd2b1ca447..dd75ae0df6a 100644 --- a/secboot/export_sb_test.go +++ b/secboot/export_sb_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/secboot/keys/keys_dummy.go b/secboot/keys/keys_dummy.go index dd2cf35f877..802ad7e5468 100644 --- a/secboot/keys/keys_dummy.go +++ b/secboot/keys/keys_dummy.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build nosecboot -// +build nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/secboot/keys/keys_sb.go b/secboot/keys/keys_sb.go index 674268036ef..b41017b9609 100644 --- a/secboot/keys/keys_sb.go +++ b/secboot/keys/keys_sb.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2022 Canonical Ltd diff --git a/secboot/secboot_dummy.go b/secboot/secboot_dummy.go index 49fa14e2383..6817fa63304 100644 --- a/secboot/secboot_dummy.go +++ b/secboot/secboot_dummy.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build nosecboot -// +build nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/secboot/secboot_hooks.go b/secboot/secboot_hooks.go index baaa39eee59..b5120cb19cc 100644 --- a/secboot/secboot_hooks.go +++ b/secboot/secboot_hooks.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/secboot/secboot_sb.go b/secboot/secboot_sb.go index 3b042b95199..ed38670586e 100644 --- a/secboot/secboot_sb.go +++ b/secboot/secboot_sb.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/secboot/secboot_sb_test.go b/secboot/secboot_sb_test.go index c5b3ff79492..71e273844e3 100644 --- a/secboot/secboot_sb_test.go +++ b/secboot/secboot_sb_test.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/secboot/secboot_tpm.go b/secboot/secboot_tpm.go index 5e35a4af88f..4505fe1c3d8 100644 --- a/secboot/secboot_tpm.go +++ b/secboot/secboot_tpm.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !nosecboot -// +build !nosecboot /* * Copyright (C) 2021 Canonical Ltd diff --git a/snapdenv/withtestkeys.go b/snapdenv/withtestkeys.go index 7614ed9efb8..aa7c2fe03fc 100644 --- a/snapdenv/withtestkeys.go +++ b/snapdenv/withtestkeys.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build withtestkeys -// +build withtestkeys /* * Copyright (C) 2016-2020 Canonical Ltd diff --git a/snapdtool/tool_other.go b/snapdtool/tool_other.go index 454093e3805..a3b335f65f0 100644 --- a/snapdtool/tool_other.go +++ b/snapdtool/tool_other.go @@ -1,6 +1,5 @@ // -*- Mode: Go; indent-tabs-mode: t -*- //go:build !linux -// +build !linux /* * Copyright (C) 2018 Canonical Ltd diff --git a/strutil/ctrl16.go b/strutil/ctrl16.go index 425c8913d3b..7c1566b65cb 100644 --- a/strutil/ctrl16.go +++ b/strutil/ctrl16.go @@ -1,5 +1,4 @@ //go:build !go1.7 -// +build !go1.7 package strutil diff --git a/strutil/ctrl17.go b/strutil/ctrl17.go index e52dec6a4f0..4b25394c37a 100644 --- a/strutil/ctrl17.go +++ b/strutil/ctrl17.go @@ -1,5 +1,4 @@ //go:build go1.7 -// +build go1.7 package strutil diff --git a/tests/nested/manual/core20-da-lockout/getdalockout.go b/tests/nested/manual/core20-da-lockout/getdalockout.go index f492f3480f6..8ffccd2cd31 100644 --- a/tests/nested/manual/core20-da-lockout/getdalockout.go +++ b/tests/nested/manual/core20-da-lockout/getdalockout.go @@ -1,5 +1,4 @@ //go:build !nosecboot -// +build !nosecboot package main diff --git a/tests/nested/manual/core20-da-lockout/getdalockout_nosecboot.go b/tests/nested/manual/core20-da-lockout/getdalockout_nosecboot.go index 99150a2d877..27cbc4fbad2 100644 --- a/tests/nested/manual/core20-da-lockout/getdalockout_nosecboot.go +++ b/tests/nested/manual/core20-da-lockout/getdalockout_nosecboot.go @@ -1,5 +1,4 @@ //go:build nosecboot -// +build nosecboot // Note: This file is needed to ensure that debian does not pick it up when building, // otherwise it produces the error: cannot find package "github.com/canonical/go-tpm2"