Skip to content

Commit

Permalink
go: go fix with 1.18
Browse files Browse the repository at this point in the history
Apply `go fix ./...` to the whole code base using go-1.18 to remove
old build tags.
  • Loading branch information
xnox authored and mvo5 committed Sep 25, 2023
1 parent 6711192 commit d55f312
Show file tree
Hide file tree
Showing 90 changed files with 0 additions and 91 deletions.
1 change: 0 additions & 1 deletion asserts/sysdb/staging.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withtestkeys || withstagingkeys
// +build withtestkeys withstagingkeys

/*
* Copyright (C) 2016 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion asserts/sysdb/testkeys.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withtestkeys
// +build withtestkeys

/*
* Copyright (C) 2016 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion bootloader/assets/assetstesting.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withbootassetstesting
// +build withbootassetstesting

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion bootloader/withbootassettesting.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withbootassetstesting
// +build withbootassetstesting

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion bootloader/withbootassettesting_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withbootassetstesting
// +build withbootassetstesting

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build nosecboot
// +build nosecboot

/*
* Copyright (C) 2019-2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-bootstrap/cmd_initramfs_mounts_secboot.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2019-2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-repair/staging.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withtestkeys || withstagingkeys
// +build withtestkeys withstagingkeys

/*
* Copyright (C) 2017-2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-repair/testkeys.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build withtestkeys
// +build withtestkeys

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-seccomp/main_nonriscv64.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//
//go:build !riscv64
// +build !riscv64

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-seccomp/main_ppc64le.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-seccomp/main_riscv64.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//
//go:build riscv64
// +build riscv64

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-seccomp/old_seccomp.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build oldseccomp
// +build oldseccomp

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap-update-ns/bootstrap_ppc64le.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion cmd/snap/cmd_userd.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !darwin
// +build !darwin

/*
* Copyright (C) 2017-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap/cmd_userd_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !darwin
// +build !darwin

/*
* Copyright (C) 2016-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion cmd/snap/cmd_version_other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !linux
// +build !linux

/*
* Copyright (C) 2016 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/encrypt.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/encrypt_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/export_secboot_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/install.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2019-2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/install_dummy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build nosecboot
// +build nosecboot

/*
* Copyright (C) 2019-2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/install_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nosecboot
// +build !nosecboot

/*
* Copyright (C) 2019-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion gadget/install/mount_other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !linux
// +build !linux

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion image/preseed/preseed_other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !linux
// +build !linux

/*
* Copyright (C) 2019-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/chattr_32.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build arm || 386 || ppc
// +build arm 386 ppc

/*
* Copyright (C) 2016 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/chattr_64.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion osutil/cp_other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !linux
// +build !linux

/*
* Copyright (C) 2014-2015 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/export_fault_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build faultinject
// +build faultinject

/*
* Copyright (C) 2016 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/faultinject.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build faultinject
// +build faultinject

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/faultinject_fake.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !faultinject
// +build !faultinject

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/faultinject_fake_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !faultinject
// +build !faultinject

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/faultinject_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build faultinject
// +build faultinject

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/group_cgo.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build cgo
// +build cgo

/*
* Copyright (C) 2017-2019 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/group_no_cgo.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !cgo
// +build !cgo

package osutil

Expand Down
1 change: 0 additions & 1 deletion osutil/inotify/inotify_linux.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion osutil/inotify/inotify_linux_test.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion osutil/inotify/inotify_others.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !linux
// +build !linux

/*
Copyright 2020 The Kubernetes Authors.
Expand Down
2 changes: 0 additions & 2 deletions osutil/settime_32bit.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion osutil/settime_64bit.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- Mode: Go; indent-tabs-mode: t -*-

//go:build !386 && !arm && linux
// +build !386,!arm,linux

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/sys/sysnum_16_linux.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build arm || 386
// +build arm 386

/*
* Copyright (C) 2017 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion osutil/sys/sysnum_32_linux.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion osutil/udev/netlink/rawsockstop_other.go
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/certs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/certs_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2020 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/cloud.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2018 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/cloud_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2018 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/early_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2023 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/kernel.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2023 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/netplan.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/netplan_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2021 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/proxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2017-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/proxy_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2017-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/refresh.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2017-2022 Canonical Ltd
Expand Down
1 change: 0 additions & 1 deletion overlord/configstate/configcore/refresh_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//go:build !nomanagers
// +build !nomanagers

/*
* Copyright (C) 2017-2018 Canonical Ltd
Expand Down
Loading

0 comments on commit d55f312

Please sign in to comment.