Skip to content

Commit 1ad3822

Browse files
nixprimegvisor-bot
authored andcommitted
Add go:build directives as required by Go 1.17's gofmt.
PiperOrigin-RevId: 385894869
1 parent 7ced03b commit 1ad3822

File tree

185 files changed

+243
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+243
-32
lines changed

pkg/abi/abi_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build linux
1516
// +build linux
1617

1718
package abi

pkg/abi/linux/arch_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package linux

pkg/abi/linux/epoll_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package linux

pkg/abi/linux/epoll_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package linux

pkg/abi/linux/file_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package linux

pkg/abi/linux/file_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package linux

pkg/abi/linux/ptrace_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package linux

pkg/abi/linux/ptrace_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package linux

pkg/abi/linux/sem_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package linux

pkg/abi/linux/sem_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package linux

pkg/atomicbitops/aligned_32bit_unsafe.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm || mips || 386
1516
// +build arm mips 386
1617

1718
package atomicbitops

pkg/atomicbitops/aligned_64bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build !arm && !mips && !386
1516
// +build !arm,!mips,!386
1617

1718
package atomicbitops

pkg/atomicbitops/atomicbitops.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64 || arm64
1516
// +build amd64 arm64
1617

1718
// Package atomicbitops provides extensions to the sync/atomic package.

pkg/atomicbitops/atomicbitops_noasm.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build !amd64 && !arm64
1516
// +build !amd64,!arm64
1617

1718
package atomicbitops

pkg/bits/uint64_arch.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64 || arm64
1516
// +build amd64 arm64
1617

1718
package bits

pkg/bits/uint64_arch_amd64_asm.s

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
TEXT ·TrailingZeros64(SB),$0-16

pkg/bits/uint64_arch_arm64_asm.s

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
TEXT ·TrailingZeros64(SB),$0-16

pkg/bits/uint64_arch_generic.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build !amd64 && !arm64
1516
// +build !amd64,!arm64
1617

1718
package bits

pkg/coverage/coverage.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
// Package coverage provides an interface through which Go coverage data can
1619
// be collected, converted to kcov format, and exposed to userspace.
1720
//

pkg/cpuid/cpuid_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package cpuid

pkg/cpuid/cpuid_arm64_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package cpuid

pkg/cpuid/cpuid_parse_x86_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build 386 || amd64
1516
// +build 386 amd64
1617

1718
package cpuid

pkg/cpuid/cpuid_x86.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build 386 || amd64
1516
// +build 386 amd64
1617

1718
package cpuid

pkg/cpuid/cpuid_x86_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build 386 || amd64
1516
// +build 386 amd64
1617

1718
package cpuid

pkg/crypto/crypto_stdlib.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
package crypto
1619

1720
import (

pkg/eventchannel/event_any.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
package eventchannel
1619

1720
import (

pkg/fdchannel/fdchannel_unsafe.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
1516
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
1617

1718
// Package fdchannel implements passing file descriptors between processes over

pkg/fdnotifier/fdnotifier.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build linux
1516
// +build linux
1617

1718
// Package fdnotifier contains an adapter that translates IO events (e.g., a

pkg/fdnotifier/poll_unsafe.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build linux
1516
// +build linux
1617

1718
package fdnotifier

pkg/flipcall/ctrl_futex.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
package flipcall
1619

1720
import (

pkg/flipcall/futex_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build linux
1516
// +build linux
1617

1718
package flipcall

pkg/gohacks/gohacks_unsafe.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// +build go1.13
16-
// +build !go1.18
15+
//go:build go1.13 && !go1.18
16+
// +build go1.13,!go1.18
1717

1818
// Check type signatures when updating Go version.
1919

pkg/goid/goid.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// +build go1.12
16-
// +build !go1.18
15+
//go:build go1.12 && !go1.18
16+
// +build go1.12,!go1.18
1717

1818
// Check type signatures when updating Go version.
1919

pkg/hostarch/hostarch_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package hostarch

pkg/hostarch/hostarch_x86.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64 || 386
1516
// +build amd64 386
1617

1718
package hostarch

pkg/memutil/memfd_linux_unsafe.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build linux
1516
// +build linux
1617

1718
package memutil

pkg/memutil/mmap.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
package memutil
1619

1720
import (

pkg/procid/procid.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build go1.1
16+
// +build go1.1
17+
1518
// Package procid provides a way to get the current system thread identifier.
1619
package procid
1720

pkg/procid/procid_amd64.s

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// +build amd64
16-
// +build go1.8
17-
// +build !go1.18
15+
//go:build amd64 && go1.8 && !go1.18 && go1.1
16+
// +build amd64,go1.8,!go1.18,go1.1
1817

1918
#include "textflag.h"
2019

pkg/procid/procid_arm64.s

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// +build arm64
16-
// +build go1.8
17-
// +build !go1.18
15+
//go:build arm64 && go1.8 && !go1.18 && go1.1
16+
// +build arm64,go1.8,!go1.18,go1.1
1817

1918
#include "textflag.h"
2019

pkg/rand/rand.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build !linux
1516
// +build !linux
1617

1718
// Package rand implements a cryptographically secure pseudorandom number

pkg/ring0/aarch64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package ring0

pkg/ring0/defs_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package ring0

pkg/ring0/defs_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package ring0

pkg/ring0/entry_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build amd64
1516
// +build amd64
1617

1718
package ring0

pkg/ring0/entry_arm64.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//go:build arm64
1516
// +build arm64
1617

1718
package ring0

0 commit comments

Comments
 (0)