From d4b26382342c98a95b85140b2863bc30c48edd68 Mon Sep 17 00:00:00 2001 From: Russ Cox <rsc@golang.org> Date: Fri, 19 Feb 2021 18:35:10 -0500 Subject: [PATCH] all: go fmt std cmd (but revert vendor) Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> --- src/archive/tar/stat_actime1.go | 1 + src/archive/tar/stat_actime2.go | 1 + src/archive/tar/stat_unix.go | 1 + src/bytes/boundary_test.go | 1 + src/cmd/api/run.go | 1 + src/cmd/compile/internal/gc/bootstrap.go | 1 + src/cmd/compile/internal/gc/pprof.go | 1 + src/cmd/compile/internal/gc/trace.go | 1 + src/cmd/compile/internal/ir/mknode.go | 1 + src/cmd/compile/internal/logopt/escape.go | 1 + .../internal/logopt/escape_bootstrap.go | 1 + src/cmd/compile/internal/ssa/flags_test.go | 1 + .../internal/typecheck/mapfile_mmap.go | 1 + .../internal/typecheck/mapfile_read.go | 1 + .../compile/internal/typecheck/mkbuiltin.go | 1 + .../compile/internal/types2/example_test.go | 1 + src/cmd/dist/sys_default.go | 1 + src/cmd/dist/test_linux.go | 1 + src/cmd/dist/util_gc.go | 1 + src/cmd/dist/util_gccgo.go | 1 + src/cmd/go/go11.go | 1 + src/cmd/go/go_unix_test.go | 1 + src/cmd/go/internal/base/signal_notunix.go | 1 + src/cmd/go/internal/base/signal_unix.go | 1 + .../internal/filelock/filelock_fcntl.go | 1 + .../internal/filelock/filelock_other.go | 1 + .../internal/filelock/filelock_plan9.go | 1 + .../internal/filelock/filelock_test.go | 1 + .../internal/filelock/filelock_unix.go | 1 + .../internal/filelock/filelock_windows.go | 1 + .../lockedfile/lockedfile_filelock.go | 1 + .../internal/lockedfile/lockedfile_plan9.go | 1 + .../go/internal/lockedfile/lockedfile_test.go | 1 + .../go/internal/lockedfile/transform_test.go | 1 + src/cmd/go/internal/modfetch/bootstrap.go | 1 + .../go/internal/modfetch/codehost/shell.go | 1 + src/cmd/go/internal/modfetch/sumdb.go | 1 + src/cmd/go/internal/modload/stat_openfile.go | 1 + src/cmd/go/internal/modload/stat_unix.go | 1 + src/cmd/go/internal/modload/stat_windows.go | 1 + src/cmd/go/internal/renameio/renameio_test.go | 1 + src/cmd/go/internal/renameio/umask_test.go | 1 + .../go/internal/robustio/robustio_flaky.go | 1 + .../go/internal/robustio/robustio_other.go | 1 + src/cmd/go/internal/test/genflags.go | 1 + src/cmd/go/internal/web/bootstrap.go | 1 + src/cmd/go/internal/web/http.go | 1 + src/cmd/go/internal/web/url_other.go | 1 + src/cmd/go/internal/web/url_other_test.go | 1 + src/cmd/go/internal/work/testgo.go | 1 + src/cmd/internal/bio/buf_mmap.go | 1 + src/cmd/internal/bio/buf_nommap.go | 1 + src/cmd/internal/goobj/mkbuiltin.go | 1 + src/cmd/internal/obj/stringer.go | 1 + src/cmd/link/elf_test.go | 1 + src/cmd/link/internal/ld/elf_test.go | 1 + src/cmd/link/internal/ld/execarchive.go | 1 + .../link/internal/ld/execarchive_noexec.go | 1 + src/cmd/link/internal/ld/fallocate_test.go | 1 + src/cmd/link/internal/ld/outbuf_mmap.go | 1 + .../link/internal/ld/outbuf_nofallocate.go | 1 + src/cmd/link/internal/ld/outbuf_nommap.go | 1 + src/cmd/link/internal/ld/outbuf_notdarwin.go | 1 + src/cmd/nm/nm_cgo_test.go | 1 + src/cmd/pprof/readlineui.go | 1 + src/cmd/trace/annotations_test.go | 1 + src/cmd/trace/trace_test.go | 1 + src/cmd/trace/trace_unix_test.go | 1 + src/crypto/aes/aes_gcm.go | 1 + src/crypto/aes/cipher_asm.go | 1 + src/crypto/aes/cipher_generic.go | 1 + src/crypto/aes/gcm_ppc64le.go | 1 + src/crypto/cipher/xor_generic.go | 1 + src/crypto/cipher/xor_ppc64x.go | 1 + src/crypto/ecdsa/ecdsa_noasm.go | 1 + src/crypto/ecdsa/ecdsa_s390x_test.go | 1 + src/crypto/elliptic/fuzz_test.go | 1 + src/crypto/elliptic/p256.go | 1 + src/crypto/elliptic/p256_asm.go | 1 + src/crypto/elliptic/p256_generic.go | 1 + src/crypto/elliptic/p256_ppc64le.go | 1 + src/crypto/elliptic/p256_s390x.go | 1 + src/crypto/internal/subtle/aliasing.go | 1 + .../internal/subtle/aliasing_appengine.go | 1 + src/crypto/md5/gen.go | 1 + src/crypto/md5/md5block_decl.go | 1 + src/crypto/md5/md5block_generic.go | 1 + src/crypto/rand/eagain.go | 1 + src/crypto/rand/rand_batched.go | 1 + src/crypto/rand/rand_batched_test.go | 1 + src/crypto/rand/rand_js.go | 1 + src/crypto/rand/rand_unix.go | 1 + src/crypto/sha1/fallback_test.go | 1 + src/crypto/sha1/issue15617_test.go | 1 + src/crypto/sha1/sha1block_decl.go | 1 + src/crypto/sha1/sha1block_generic.go | 1 + src/crypto/sha256/fallback_test.go | 1 + src/crypto/sha256/sha256block_decl.go | 1 + src/crypto/sha256/sha256block_generic.go | 1 + src/crypto/sha512/fallback_test.go | 1 + src/crypto/sha512/sha512block_amd64.go | 1 + src/crypto/sha512/sha512block_decl.go | 1 + src/crypto/sha512/sha512block_generic.go | 1 + src/crypto/tls/generate_cert.go | 1 + src/crypto/tls/handshake_unix_test.go | 1 + .../x509/internal/macos/corefoundation.go | 1 + src/crypto/x509/internal/macos/security.go | 1 + src/crypto/x509/root_bsd.go | 1 + src/crypto/x509/root_darwin.go | 1 + src/crypto/x509/root_ios.go | 4 ++-- src/crypto/x509/root_ios_gen.go | 1 + src/crypto/x509/root_js.go | 1 + src/crypto/x509/root_omit.go | 1 + src/crypto/x509/root_omit_test.go | 1 + src/crypto/x509/root_plan9.go | 1 + src/crypto/x509/root_unix.go | 1 + src/crypto/x509/root_unix_test.go | 1 + src/crypto/x509/x509_test_import.go | 1 + src/debug/pe/file_cgo_test.go | 1 + src/encoding/csv/fuzz.go | 1 + src/encoding/gob/debug.go | 1 + src/encoding/gob/decgen.go | 1 + src/encoding/gob/dump.go | 1 + src/encoding/gob/encgen.go | 1 + src/encoding/json/fuzz.go | 1 + src/go/build/gc.go | 1 + src/go/build/gccgo.go | 1 + src/go/doc/headscan.go | 1 + src/go/types/example_test.go | 1 + src/go/types/gotype.go | 1 + src/hash/crc32/crc32_otherarch.go | 1 + src/hash/crc32/gen_const_ppc64le.go | 1 + src/html/fuzz.go | 1 + src/image/color/palette/gen.go | 1 + src/image/internal/imageutil/gen.go | 1 + src/image/png/fuzz.go | 1 + src/index/suffixarray/gen.go | 1 + src/internal/abi/abi_amd64.go | 1 + src/internal/abi/abi_generic.go | 1 + src/internal/bytealg/compare_generic.go | 1 + src/internal/bytealg/compare_native.go | 1 + src/internal/bytealg/count_generic.go | 1 + src/internal/bytealg/count_native.go | 1 + src/internal/bytealg/index_generic.go | 1 + src/internal/bytealg/index_native.go | 1 + src/internal/bytealg/indexbyte_generic.go | 1 + src/internal/bytealg/indexbyte_native.go | 1 + src/internal/cpu/cpu_arm64_android.go | 1 + src/internal/cpu/cpu_arm64_darwin.go | 5 ++--- src/internal/cpu/cpu_arm64_freebsd.go | 1 + src/internal/cpu/cpu_arm64_hwcap.go | 4 ++-- src/internal/cpu/cpu_arm64_linux.go | 5 ++--- src/internal/cpu/cpu_arm64_other.go | 1 + src/internal/cpu/cpu_mips64x.go | 1 + src/internal/cpu/cpu_no_name.go | 4 ++-- src/internal/cpu/cpu_ppc64x.go | 1 + src/internal/cpu/cpu_ppc64x_aix.go | 1 + src/internal/cpu/cpu_ppc64x_linux.go | 1 + src/internal/cpu/cpu_x86.go | 1 + src/internal/cpu/cpu_x86_test.go | 1 + src/internal/goroot/gc.go | 1 + src/internal/goroot/gccgo.go | 1 + src/internal/poll/errno_unix.go | 1 + src/internal/poll/errno_windows.go | 1 + src/internal/poll/error_stub_test.go | 1 + src/internal/poll/export_posix_test.go | 1 + src/internal/poll/fcntl_js.go | 1 + src/internal/poll/fcntl_libc.go | 1 + src/internal/poll/fcntl_syscall.go | 1 + src/internal/poll/fd_fsync_posix.go | 1 + src/internal/poll/fd_poll_js.go | 1 + src/internal/poll/fd_poll_runtime.go | 1 + src/internal/poll/fd_posix.go | 1 + src/internal/poll/fd_posix_test.go | 1 + src/internal/poll/fd_unix.go | 1 + src/internal/poll/fd_writev_darwin.go | 1 + src/internal/poll/fd_writev_illumos.go | 1 + src/internal/poll/fd_writev_unix.go | 1 + src/internal/poll/hook_cloexec.go | 1 + src/internal/poll/hook_unix.go | 1 + src/internal/poll/iovec_illumos.go | 1 + src/internal/poll/iovec_unix.go | 1 + src/internal/poll/sendfile_bsd.go | 1 + src/internal/poll/sock_cloexec.go | 1 + src/internal/poll/sockopt.go | 1 + src/internal/poll/sockopt_unix.go | 1 + src/internal/poll/sockoptip.go | 1 + src/internal/poll/strconv.go | 1 + src/internal/poll/sys_cloexec.go | 1 + src/internal/poll/writev.go | 1 + src/internal/race/norace.go | 1 + src/internal/race/race.go | 1 + .../syscall/execenv/execenv_default.go | 1 + .../syscall/execenv/execenv_windows.go | 1 + src/internal/syscall/unix/at.go | 1 + src/internal/syscall/unix/at_libc.go | 1 + .../syscall/unix/at_sysnum_fstatat64_linux.go | 1 + .../syscall/unix/at_sysnum_fstatat_linux.go | 1 + .../unix/at_sysnum_newfstatat_linux.go | 1 + .../syscall/unix/fcntl_linux_32bit.go | 1 + src/internal/syscall/unix/nonblocking.go | 1 + src/internal/syscall/unix/nonblocking_js.go | 1 + src/internal/syscall/unix/nonblocking_libc.go | 1 + src/internal/syscall/unix/pipe2_illumos.go | 1 + .../syscall/unix/sysnum_linux_generic.go | 1 + .../syscall/unix/sysnum_linux_mips64x.go | 1 + .../syscall/unix/sysnum_linux_mipsx.go | 1 + .../syscall/unix/sysnum_linux_ppc64x.go | 1 + src/internal/syscall/unix/writev_illumos.go | 1 + src/internal/testenv/testenv_cgo.go | 1 + src/internal/testenv/testenv_notwin.go | 1 + src/log/syslog/example_test.go | 1 + src/log/syslog/syslog.go | 1 + src/log/syslog/syslog_test.go | 1 + src/log/syslog/syslog_unix.go | 1 + src/math/big/arith_amd64.go | 1 + src/math/big/arith_decl.go | 1 + src/math/big/arith_decl_pure.go | 1 + src/math/big/arith_decl_s390x.go | 1 + src/math/big/arith_s390x_test.go | 1 + src/math/bits/bits_errors.go | 1 + src/math/bits/bits_errors_bootstrap.go | 1 + src/math/bits/make_examples.go | 1 + src/math/bits/make_tables.go | 1 + src/math/cmplx/huge_test.go | 1 + src/math/exp_asm.go | 1 + src/math/huge_test.go | 1 + src/math/rand/gen_cooked.go | 1 + src/mime/type_unix.go | 1 + src/net/addrselect.go | 1 + src/net/addrselect_test.go | 1 + src/net/cgo_aix.go | 1 + src/net/cgo_android.go | 1 + src/net/cgo_bsd.go | 4 +++- src/net/cgo_linux.go | 1 + src/net/cgo_netbsd.go | 1 + src/net/cgo_openbsd.go | 1 + src/net/cgo_resnew.go | 4 +++- src/net/cgo_resold.go | 4 +++- src/net/cgo_socknew.go | 4 +++- src/net/cgo_sockold.go | 4 +++- src/net/cgo_solaris.go | 1 + src/net/cgo_stub.go | 1 + src/net/cgo_unix.go | 4 +++- src/net/cgo_unix_test.go | 4 +++- src/net/cgo_windows.go | 1 + src/net/conf.go | 1 + src/net/conf_netcgo.go | 1 + src/net/conf_test.go | 1 + src/net/conn_test.go | 1 + src/net/dial_test.go | 1 + src/net/dial_unix_test.go | 1 + src/net/dnsclient_unix.go | 1 + src/net/dnsclient_unix_test.go | 1 + src/net/dnsconfig_unix.go | 1 + src/net/dnsconfig_unix_test.go | 1 + src/net/dnsname_test.go | 1 + src/net/error_posix.go | 1 + src/net/error_posix_test.go | 1 + src/net/error_test.go | 1 + src/net/error_unix.go | 1 + src/net/error_unix_test.go | 1 + src/net/external_test.go | 1 + src/net/fd_posix.go | 1 + src/net/fd_unix.go | 1 + src/net/file_stub.go | 1 + src/net/file_test.go | 1 + src/net/file_unix.go | 1 + src/net/hook_unix.go | 1 + src/net/http/cgi/plan9_test.go | 1 + src/net/http/cgi/posix_test.go | 1 + src/net/http/h2_bundle.go | 1 + src/net/http/omithttp2.go | 1 + src/net/http/roundtrip.go | 1 + src/net/http/roundtrip_js.go | 1 + src/net/http/triv.go | 1 + src/net/interface_bsd.go | 1 + src/net/interface_bsd_test.go | 1 + src/net/interface_bsdvar.go | 1 + src/net/interface_stub.go | 1 + src/net/interface_test.go | 1 + src/net/interface_unix_test.go | 1 + src/net/internal/socktest/main_test.go | 1 + src/net/internal/socktest/main_unix_test.go | 1 + src/net/internal/socktest/switch_posix.go | 1 + src/net/internal/socktest/switch_stub.go | 1 + src/net/internal/socktest/switch_unix.go | 1 + src/net/internal/socktest/sys_cloexec.go | 1 + src/net/internal/socktest/sys_unix.go | 1 + src/net/ip_test.go | 1 + src/net/iprawsock_posix.go | 1 + src/net/iprawsock_test.go | 1 + src/net/ipsock_posix.go | 1 + src/net/listen_test.go | 1 + src/net/lookup_fake.go | 1 + src/net/lookup_test.go | 1 + src/net/lookup_unix.go | 1 + src/net/main_cloexec_test.go | 1 + src/net/main_conf_test.go | 1 + src/net/main_noconf_test.go | 1 + src/net/main_posix_test.go | 1 + src/net/main_test.go | 1 + src/net/main_unix_test.go | 1 + src/net/mockserver_test.go | 1 + src/net/net_fake.go | 1 + src/net/net_test.go | 1 + src/net/netgo_unix_test.go | 1 + src/net/nss.go | 1 + src/net/nss_test.go | 1 + src/net/packetconn_test.go | 1 + src/net/port_unix.go | 1 + src/net/protoconn_test.go | 1 + src/net/rawconn_stub_test.go | 1 + src/net/rawconn_test.go | 1 + src/net/rawconn_unix_test.go | 1 + src/net/sendfile_stub.go | 1 + src/net/sendfile_test.go | 1 + src/net/sendfile_unix_alt.go | 1 + src/net/server_test.go | 1 + src/net/sock_bsd.go | 1 + src/net/sock_cloexec.go | 1 + src/net/sock_posix.go | 1 + src/net/sock_stub.go | 1 + src/net/sockaddr_posix.go | 1 + src/net/sockopt_bsd.go | 1 + src/net/sockopt_posix.go | 1 + src/net/sockopt_stub.go | 1 + src/net/sockoptip_bsdvar.go | 1 + src/net/sockoptip_posix.go | 1 + src/net/sockoptip_stub.go | 1 + src/net/splice_stub.go | 1 + src/net/splice_test.go | 1 + src/net/sys_cloexec.go | 1 + src/net/tcpsock_posix.go | 1 + src/net/tcpsock_test.go | 1 + src/net/tcpsock_unix_test.go | 1 + src/net/tcpsockopt_posix.go | 1 + src/net/tcpsockopt_stub.go | 1 + src/net/tcpsockopt_unix.go | 1 + src/net/timeout_test.go | 1 + src/net/udpsock_posix.go | 1 + src/net/udpsock_test.go | 1 + src/net/unixsock_posix.go | 1 + src/net/unixsock_test.go | 1 + src/net/unixsock_windows_test.go | 1 + src/net/write_unix_test.go | 1 + src/net/writev_test.go | 1 + src/net/writev_unix.go | 1 + src/os/dir_unix.go | 1 + src/os/endian_big.go | 1 + src/os/endian_little.go | 1 + src/os/env_unix_test.go | 1 + src/os/error_errno.go | 1 + src/os/error_posix.go | 1 + src/os/error_unix_test.go | 1 + src/os/error_windows_test.go | 1 + src/os/exec/exec_linux_test.go | 1 + src/os/exec/exec_posix_test.go | 1 + src/os/exec/exec_unix.go | 1 + src/os/exec/lp_js.go | 1 + src/os/exec/lp_unix.go | 1 + src/os/exec/lp_unix_test.go | 1 + src/os/exec/read3.go | 1 + src/os/exec_posix.go | 1 + src/os/exec_unix.go | 1 + src/os/exec_unix_test.go | 1 + src/os/executable_path.go | 1 + src/os/executable_plan9.go | 1 + src/os/executable_procfs.go | 1 + src/os/executable_sysctl.go | 1 + src/os/export_unix_test.go | 1 + src/os/fifo_test.go | 1 + src/os/file_posix.go | 1 + src/os/file_unix.go | 1 + src/os/os_unix_test.go | 1 + src/os/path_unix.go | 1 + src/os/pipe2_bsd.go | 1 + src/os/pipe2_illumos.go | 1 + src/os/pipe_bsd.go | 1 + src/os/pipe_test.go | 1 + src/os/rawconn.go | 1 + src/os/rawconn_test.go | 1 + src/os/readfrom_stub.go | 1 + src/os/removeall_at.go | 1 + src/os/removeall_noat.go | 1 + src/os/signal/example_unix_test.go | 1 + src/os/signal/internal/pty/pty.go | 1 + src/os/signal/signal_cgo_test.go | 1 + src/os/signal/signal_linux_test.go | 1 + src/os/signal/signal_test.go | 1 + src/os/signal/signal_unix.go | 1 + src/os/stat_js.go | 1 + src/os/stat_unix.go | 1 + src/os/sticky_bsd.go | 1 + src/os/sticky_notbsd.go | 1 + src/os/sys_bsd.go | 1 + src/os/sys_js.go | 1 + src/os/sys_unix.go | 1 + src/os/timeout_test.go | 5 ++--- src/os/types_unix.go | 4 ++-- src/os/user/cgo_lookup_unix.go | 4 +++- src/os/user/cgo_unix_test.go | 4 +++- src/os/user/getgrouplist_darwin.go | 1 + src/os/user/getgrouplist_unix.go | 4 +++- src/os/user/listgroups_aix.go | 1 + src/os/user/listgroups_solaris.go | 1 + src/os/user/listgroups_unix.go | 4 +++- src/os/user/lookup_android.go | 1 + src/os/user/lookup_stubs.go | 1 + src/os/user/lookup_unix.go | 1 + src/os/user/lookup_unix_test.go | 1 + src/os/wait_unimp.go | 1 + src/os/wait_wait6.go | 1 + src/os/wait_waitid.go | 1 + src/path/filepath/example_unix_test.go | 1 + src/path/filepath/example_unix_walk_test.go | 1 + src/path/filepath/path_unix.go | 1 + src/path/filepath/symlink_unix.go | 1 + src/plugin/plugin_dlopen.go | 1 + src/plugin/plugin_stubs.go | 1 + src/plugin/plugin_test.go | 1 + src/regexp/exec2_test.go | 1 + src/runtime/auxv_none.go | 8 ++------ src/runtime/cgo/callbacks_traceback.go | 1 + src/runtime/cgo/dragonfly.go | 1 + src/runtime/cgo/freebsd.go | 1 + src/runtime/cgo/linux.go | 1 + src/runtime/cgo/mmap.go | 1 + src/runtime/cgo/netbsd.go | 1 + src/runtime/cgo/openbsd.go | 1 + src/runtime/cgo/setenv.go | 1 + src/runtime/cgo/sigaction.go | 1 + src/runtime/cgo_mmap.go | 1 + src/runtime/cgo_ppc64x.go | 1 + src/runtime/cgo_sigaction.go | 1 + src/runtime/cputicks.go | 9 ++------- src/runtime/crash_cgo_test.go | 1 + src/runtime/crash_nonunix_test.go | 1 + src/runtime/crash_unix_test.go | 1 + src/runtime/debug/panic_test.go | 1 + src/runtime/debug_test.go | 5 ++--- src/runtime/debugcall.go | 1 + src/runtime/debuglog_off.go | 1 + src/runtime/debuglog_on.go | 1 + src/runtime/defs1_linux.go | 1 + src/runtime/defs2_linux.go | 1 + src/runtime/defs3_linux.go | 1 + src/runtime/defs_aix.go | 1 + src/runtime/defs_aix_ppc64.go | 1 + src/runtime/defs_arm_linux.go | 1 + src/runtime/defs_darwin.go | 1 + src/runtime/defs_dragonfly.go | 1 + src/runtime/defs_freebsd.go | 1 + src/runtime/defs_linux.go | 1 + src/runtime/defs_linux_mips64x.go | 1 + src/runtime/defs_linux_mipsx.go | 1 + src/runtime/defs_netbsd.go | 1 + src/runtime/defs_netbsd_386.go | 1 + src/runtime/defs_netbsd_amd64.go | 1 + src/runtime/defs_netbsd_arm.go | 1 + src/runtime/defs_openbsd.go | 1 + src/runtime/defs_solaris.go | 1 + src/runtime/defs_solaris_amd64.go | 1 + src/runtime/env_posix.go | 1 + src/runtime/export_debug_test.go | 4 ++-- src/runtime/export_futex_test.go | 1 + src/runtime/export_mmap_test.go | 1 + src/runtime/export_pipe2_test.go | 1 + src/runtime/export_pipe_test.go | 1 + src/runtime/export_unix_test.go | 1 + src/runtime/futex_test.go | 1 + src/runtime/hash32.go | 1 + src/runtime/hash64.go | 1 + src/runtime/internal/atomic/atomic_386.go | 1 + src/runtime/internal/atomic/atomic_arm.go | 1 + src/runtime/internal/atomic/atomic_arm64.go | 1 + src/runtime/internal/atomic/atomic_mips64x.go | 1 + src/runtime/internal/atomic/atomic_mipsx.go | 1 + src/runtime/internal/atomic/atomic_ppc64x.go | 1 + src/runtime/internal/atomic/stubs.go | 1 + src/runtime/internal/sys/gengoos.go | 1 + src/runtime/internal/sys/intrinsics.go | 1 + src/runtime/internal/sys/intrinsics_stubs.go | 1 + src/runtime/internal/sys/zgoarch_386.go | 1 + src/runtime/internal/sys/zgoarch_amd64.go | 1 + src/runtime/internal/sys/zgoarch_arm.go | 1 + src/runtime/internal/sys/zgoarch_arm64.go | 1 + src/runtime/internal/sys/zgoarch_arm64be.go | 1 + src/runtime/internal/sys/zgoarch_armbe.go | 1 + src/runtime/internal/sys/zgoarch_mips.go | 1 + src/runtime/internal/sys/zgoarch_mips64.go | 1 + src/runtime/internal/sys/zgoarch_mips64le.go | 1 + src/runtime/internal/sys/zgoarch_mips64p32.go | 1 + .../internal/sys/zgoarch_mips64p32le.go | 1 + src/runtime/internal/sys/zgoarch_mipsle.go | 1 + src/runtime/internal/sys/zgoarch_ppc.go | 1 + src/runtime/internal/sys/zgoarch_ppc64.go | 1 + src/runtime/internal/sys/zgoarch_ppc64le.go | 1 + src/runtime/internal/sys/zgoarch_riscv.go | 1 + src/runtime/internal/sys/zgoarch_riscv64.go | 1 + src/runtime/internal/sys/zgoarch_s390.go | 1 + src/runtime/internal/sys/zgoarch_s390x.go | 1 + src/runtime/internal/sys/zgoarch_sparc.go | 1 + src/runtime/internal/sys/zgoarch_sparc64.go | 1 + src/runtime/internal/sys/zgoarch_wasm.go | 1 + src/runtime/internal/sys/zgoos_aix.go | 1 + src/runtime/internal/sys/zgoos_android.go | 1 + src/runtime/internal/sys/zgoos_darwin.go | 4 ++-- src/runtime/internal/sys/zgoos_dragonfly.go | 1 + src/runtime/internal/sys/zgoos_freebsd.go | 1 + src/runtime/internal/sys/zgoos_hurd.go | 1 + src/runtime/internal/sys/zgoos_illumos.go | 1 + src/runtime/internal/sys/zgoos_ios.go | 1 + src/runtime/internal/sys/zgoos_js.go | 1 + src/runtime/internal/sys/zgoos_linux.go | 4 ++-- src/runtime/internal/sys/zgoos_netbsd.go | 1 + src/runtime/internal/sys/zgoos_openbsd.go | 1 + src/runtime/internal/sys/zgoos_plan9.go | 1 + src/runtime/internal/sys/zgoos_solaris.go | 4 ++-- src/runtime/internal/sys/zgoos_windows.go | 1 + src/runtime/internal/sys/zgoos_zos.go | 1 + src/runtime/lfstack_32bit.go | 1 + src/runtime/lfstack_64bit.go | 1 + src/runtime/libfuzzer.go | 1 + src/runtime/lock_futex.go | 1 + src/runtime/lock_js.go | 1 + src/runtime/lock_sema.go | 1 + src/runtime/lockrank_off.go | 1 + src/runtime/lockrank_on.go | 1 + src/runtime/mem_bsd.go | 1 + src/runtime/mem_js.go | 1 + src/runtime/mkduff.go | 1 + src/runtime/mkfastlog2table.go | 1 + src/runtime/mkpreempt.go | 1 + src/runtime/mksizeclasses.go | 1 + src/runtime/mmap.go | 1 + src/runtime/mpagealloc_32bit.go | 1 + src/runtime/mpagealloc_64bit.go | 1 + src/runtime/msan.go | 1 + src/runtime/msan0.go | 1 + src/runtime/nbpipe_fcntl_libc_test.go | 1 + src/runtime/nbpipe_fcntl_unix_test.go | 1 + src/runtime/nbpipe_pipe.go | 1 + src/runtime/nbpipe_pipe2.go | 1 + src/runtime/nbpipe_test.go | 1 + src/runtime/netpoll.go | 1 + src/runtime/netpoll_epoll.go | 1 + src/runtime/netpoll_fake.go | 1 + src/runtime/netpoll_kqueue.go | 1 + src/runtime/netpoll_stub.go | 1 + src/runtime/norace_linux_test.go | 1 + src/runtime/norace_test.go | 1 + src/runtime/os_aix.go | 1 + src/runtime/os_freebsd2.go | 1 + src/runtime/os_freebsd_noauxv.go | 4 ++-- src/runtime/os_js.go | 1 + src/runtime/os_linux_arm64.go | 1 + src/runtime/os_linux_be64.go | 1 + src/runtime/os_linux_generic.go | 9 ++------- src/runtime/os_linux_mips64x.go | 1 + src/runtime/os_linux_mipsx.go | 1 + src/runtime/os_linux_noauxv.go | 4 ++-- src/runtime/os_linux_novdso.go | 4 ++-- src/runtime/os_linux_ppc64x.go | 1 + src/runtime/os_linux_x86.go | 1 + src/runtime/os_nonopenbsd.go | 1 + src/runtime/os_only_solaris.go | 1 + src/runtime/os_openbsd_libc.go | 1 + src/runtime/os_openbsd_syscall.go | 4 ++-- src/runtime/os_openbsd_syscall1.go | 1 + src/runtime/os_openbsd_syscall2.go | 1 + src/runtime/panic32.go | 1 + src/runtime/pprof/mprof_test.go | 19 ++++++++++--------- src/runtime/pprof/pprof_norusage.go | 1 + src/runtime/pprof/pprof_rusage.go | 1 + src/runtime/pprof/pprof_test.go | 1 + src/runtime/preempt_nonwindows.go | 1 + src/runtime/race.go | 1 + src/runtime/race/output_test.go | 1 + src/runtime/race/race.go | 1 + src/runtime/race/race_linux_test.go | 1 + src/runtime/race/race_test.go | 1 + src/runtime/race/race_unix_test.go | 1 + src/runtime/race/race_windows_test.go | 1 + src/runtime/race/sched_test.go | 1 + src/runtime/race/syso_test.go | 1 + src/runtime/race/timer_test.go | 1 + src/runtime/race0.go | 1 + src/runtime/relax_stub.go | 1 + src/runtime/runtime_mmap_test.go | 1 + src/runtime/runtime_unix_test.go | 1 + src/runtime/semasleep_test.go | 1 + src/runtime/sigaction.go | 1 + src/runtime/signal_386.go | 1 + src/runtime/signal_aix_ppc64.go | 1 + src/runtime/signal_amd64.go | 1 + src/runtime/signal_arm.go | 1 + src/runtime/signal_arm64.go | 1 + src/runtime/signal_linux_mips64x.go | 1 + src/runtime/signal_linux_mipsx.go | 1 + src/runtime/signal_linux_ppc64x.go | 1 + src/runtime/signal_mips64x.go | 1 + src/runtime/signal_mipsx.go | 1 + src/runtime/signal_ppc64x.go | 1 + src/runtime/signal_riscv64.go | 1 + src/runtime/signal_unix.go | 1 + src/runtime/signal_windows_test.go | 1 + src/runtime/sigqueue.go | 1 + src/runtime/sigqueue_note.go | 4 ++-- src/runtime/sigtab_linux_generic.go | 7 ++----- src/runtime/sigtab_linux_mipsx.go | 1 + src/runtime/stubs2.go | 9 ++------- src/runtime/stubs3.go | 8 ++------ src/runtime/stubs_linux.go | 1 + src/runtime/stubs_mips64x.go | 1 + src/runtime/stubs_mipsx.go | 1 + src/runtime/stubs_nonlinux.go | 1 + src/runtime/stubs_ppc64x.go | 1 + src/runtime/sys_libc.go | 1 + src/runtime/sys_mips64x.go | 1 + src/runtime/sys_mipsx.go | 1 + src/runtime/sys_nonppc64x.go | 1 + src/runtime/sys_openbsd.go | 1 + src/runtime/sys_openbsd1.go | 1 + src/runtime/sys_openbsd2.go | 1 + src/runtime/sys_openbsd3.go | 1 + src/runtime/sys_ppc64x.go | 1 + src/runtime/sys_x86.go | 1 + src/runtime/time_fake.go | 4 ++-- src/runtime/time_nofake.go | 1 + src/runtime/timeasm.go | 1 + src/runtime/timestub.go | 1 + src/runtime/timestub2.go | 8 ++------ src/runtime/vdso_elf32.go | 1 + src/runtime/vdso_elf64.go | 1 + src/runtime/vdso_freebsd.go | 1 + src/runtime/vdso_freebsd_x86.go | 1 + src/runtime/vdso_in_none.go | 1 + src/runtime/vdso_linux.go | 1 + src/runtime/vdso_linux_mips64x.go | 1 + src/runtime/vdso_linux_ppc64x.go | 1 + src/runtime/vlrt.go | 1 + src/runtime/wincallback.go | 1 + src/runtime/write_err.go | 1 + src/sort/genzfunc.go | 1 + src/sort/slice_go113.go | 1 + src/sort/slice_go14.go | 1 + src/sort/slice_go18.go | 1 + src/strconv/bytealg.go | 1 + src/strconv/bytealg_bootstrap.go | 1 + src/strconv/makeisprint.go | 1 + src/sync/pool_test.go | 1 + src/sync/runtime2.go | 1 + src/sync/runtime2_lockrank.go | 1 + src/syscall/bpf_bsd.go | 1 + src/syscall/creds_test.go | 1 + src/syscall/dirent.go | 1 + src/syscall/dirent_test.go | 1 + src/syscall/endian_big.go | 1 + src/syscall/endian_little.go | 1 + src/syscall/env_unix.go | 1 + src/syscall/exec_aix_test.go | 1 + src/syscall/exec_bsd.go | 1 + src/syscall/exec_libc.go | 1 + src/syscall/exec_libc2.go | 1 + src/syscall/exec_linux.go | 1 + src/syscall/exec_linux_test.go | 1 + src/syscall/exec_solaris_test.go | 1 + src/syscall/exec_unix.go | 1 + src/syscall/exec_unix_test.go | 1 + src/syscall/export_unix_test.go | 1 + src/syscall/flock.go | 1 + src/syscall/flock_linux_32bit.go | 1 + src/syscall/forkpipe.go | 1 + src/syscall/forkpipe2.go | 1 + src/syscall/fs_js.go | 1 + src/syscall/getdirentries_test.go | 1 + src/syscall/mkasm.go | 1 + src/syscall/mkpost.go | 1 + src/syscall/mksyscall_windows.go | 1 + src/syscall/mmap_unix_test.go | 1 + src/syscall/msan.go | 1 + src/syscall/msan0.go | 1 + src/syscall/net_js.go | 1 + src/syscall/ptrace_darwin.go | 1 + src/syscall/route_bsd.go | 1 + src/syscall/route_freebsd_32bit.go | 1 + src/syscall/route_freebsd_64bit.go | 1 + src/syscall/setuidgid_32_linux.go | 1 + src/syscall/setuidgid_linux.go | 4 ++-- src/syscall/sockcmsg_unix.go | 1 + src/syscall/sockcmsg_unix_other.go | 1 + src/syscall/syscall_bsd.go | 1 + src/syscall/syscall_bsd_test.go | 1 + src/syscall/syscall_dup2_linux.go | 1 + src/syscall/syscall_dup3_linux.go | 1 + src/syscall/syscall_freebsd_test.go | 1 + src/syscall/syscall_illumos.go | 1 + src/syscall/syscall_js.go | 1 + src/syscall/syscall_linux_mips64x.go | 1 + src/syscall/syscall_linux_mipsx.go | 1 + src/syscall/syscall_linux_ppc64x.go | 1 + src/syscall/syscall_openbsd1.go | 1 + src/syscall/syscall_openbsd_libc.go | 1 + src/syscall/syscall_ptrace_test.go | 1 + src/syscall/syscall_unix.go | 1 + src/syscall/syscall_unix_test.go | 1 + src/syscall/tables_js.go | 1 + src/syscall/time_fake.go | 1 + src/syscall/time_nofake.go | 1 + src/syscall/timestruct.go | 1 + src/syscall/types_aix.go | 1 + src/syscall/types_darwin.go | 1 + src/syscall/types_dragonfly.go | 1 + src/syscall/types_freebsd.go | 1 + src/syscall/types_illumos_amd64.go | 1 + src/syscall/types_linux.go | 1 + src/syscall/types_netbsd.go | 1 + src/syscall/types_openbsd.go | 1 + src/syscall/types_solaris.go | 1 + src/syscall/zerrors_darwin_amd64.go | 1 + src/syscall/zerrors_darwin_arm64.go | 1 + src/syscall/zerrors_dragonfly_amd64.go | 1 + src/syscall/zerrors_freebsd_386.go | 1 + src/syscall/zerrors_freebsd_amd64.go | 1 + src/syscall/zerrors_freebsd_arm.go | 1 + src/syscall/zerrors_freebsd_arm64.go | 1 + src/syscall/zerrors_linux_386.go | 1 + src/syscall/zerrors_linux_amd64.go | 1 + src/syscall/zerrors_linux_arm.go | 1 + src/syscall/zerrors_linux_arm64.go | 1 + src/syscall/zerrors_linux_ppc64.go | 1 + src/syscall/zerrors_linux_ppc64le.go | 1 + src/syscall/zerrors_netbsd_386.go | 1 + src/syscall/zerrors_netbsd_amd64.go | 1 + src/syscall/zerrors_netbsd_arm.go | 1 + src/syscall/zerrors_netbsd_arm64.go | 1 + src/syscall/zerrors_openbsd_386.go | 1 + src/syscall/zerrors_openbsd_amd64.go | 1 + src/syscall/zerrors_openbsd_arm.go | 1 + src/syscall/zerrors_solaris_amd64.go | 1 + src/syscall/zsyscall_aix_ppc64.go | 1 + src/syscall/zsyscall_darwin_amd64.go | 1 + src/syscall/zsyscall_darwin_arm64.go | 1 + src/syscall/zsyscall_dragonfly_amd64.go | 1 + src/syscall/zsyscall_freebsd_386.go | 1 + src/syscall/zsyscall_freebsd_amd64.go | 1 + src/syscall/zsyscall_freebsd_arm.go | 1 + src/syscall/zsyscall_freebsd_arm64.go | 1 + src/syscall/zsyscall_linux_386.go | 1 + src/syscall/zsyscall_linux_amd64.go | 1 + src/syscall/zsyscall_linux_arm.go | 1 + src/syscall/zsyscall_linux_arm64.go | 1 + src/syscall/zsyscall_linux_mips.go | 1 + src/syscall/zsyscall_linux_mips64.go | 1 + src/syscall/zsyscall_linux_mips64le.go | 1 + src/syscall/zsyscall_linux_mipsle.go | 1 + src/syscall/zsyscall_linux_ppc64.go | 1 + src/syscall/zsyscall_linux_ppc64le.go | 1 + src/syscall/zsyscall_linux_riscv64.go | 1 + src/syscall/zsyscall_linux_s390x.go | 1 + src/syscall/zsyscall_netbsd_386.go | 1 + src/syscall/zsyscall_netbsd_amd64.go | 1 + src/syscall/zsyscall_netbsd_arm.go | 1 + src/syscall/zsyscall_netbsd_arm64.go | 1 + src/syscall/zsyscall_openbsd_386.go | 1 + src/syscall/zsyscall_openbsd_amd64.go | 1 + src/syscall/zsyscall_openbsd_arm.go | 1 + src/syscall/zsyscall_openbsd_arm64.go | 1 + src/syscall/zsyscall_openbsd_mips64.go | 1 + src/syscall/zsyscall_plan9_386.go | 1 + src/syscall/zsyscall_plan9_amd64.go | 1 + src/syscall/zsyscall_plan9_arm.go | 1 + src/syscall/zsyscall_solaris_amd64.go | 1 + src/syscall/zsysnum_darwin_amd64.go | 1 + src/syscall/zsysnum_darwin_arm64.go | 1 + src/syscall/zsysnum_dragonfly_amd64.go | 1 + src/syscall/zsysnum_freebsd_386.go | 1 + src/syscall/zsysnum_freebsd_amd64.go | 1 + src/syscall/zsysnum_freebsd_arm.go | 1 + src/syscall/zsysnum_freebsd_arm64.go | 1 + src/syscall/zsysnum_linux_386.go | 1 + src/syscall/zsysnum_linux_amd64.go | 1 + src/syscall/zsysnum_linux_arm.go | 1 + src/syscall/zsysnum_linux_arm64.go | 1 + src/syscall/zsysnum_linux_ppc64.go | 1 + src/syscall/zsysnum_linux_ppc64le.go | 1 + src/syscall/zsysnum_netbsd_386.go | 1 + src/syscall/zsysnum_netbsd_amd64.go | 1 + src/syscall/zsysnum_netbsd_arm.go | 1 + src/syscall/zsysnum_netbsd_arm64.go | 1 + src/syscall/zsysnum_openbsd_386.go | 1 + src/syscall/zsysnum_openbsd_amd64.go | 1 + src/syscall/zsysnum_openbsd_arm.go | 1 + src/syscall/zsysnum_solaris_amd64.go | 1 + src/syscall/ztypes_darwin_amd64.go | 1 + src/syscall/ztypes_darwin_arm64.go | 1 + src/syscall/ztypes_dragonfly_amd64.go | 1 + src/syscall/ztypes_freebsd_386.go | 1 + src/syscall/ztypes_freebsd_amd64.go | 1 + src/syscall/ztypes_freebsd_arm.go | 1 + src/syscall/ztypes_freebsd_arm64.go | 1 + src/syscall/ztypes_linux_386.go | 1 + src/syscall/ztypes_linux_amd64.go | 1 + src/syscall/ztypes_linux_arm.go | 1 + src/syscall/ztypes_linux_arm64.go | 1 + src/syscall/ztypes_linux_ppc64.go | 1 + src/syscall/ztypes_linux_ppc64le.go | 1 + src/syscall/ztypes_netbsd_386.go | 1 + src/syscall/ztypes_netbsd_amd64.go | 1 + src/syscall/ztypes_netbsd_arm.go | 1 + src/syscall/ztypes_netbsd_arm64.go | 1 + src/syscall/ztypes_openbsd_386.go | 1 + src/syscall/ztypes_openbsd_amd64.go | 1 + src/syscall/ztypes_solaris_amd64.go | 1 + src/testing/run_example.go | 1 + src/testing/run_example_js.go | 1 + src/time/embed.go | 1 + src/time/genzabbrs.go | 1 + src/time/sys_plan9.go | 1 + src/time/sys_unix.go | 1 + src/time/tzdata/generate_zipdata.go | 1 + src/time/zoneinfo_ios.go | 1 + src/time/zoneinfo_js.go | 1 + src/time/zoneinfo_unix.go | 1 + src/time/zoneinfo_unix_test.go | 1 + 826 files changed, 883 insertions(+), 106 deletions(-) diff --git a/src/archive/tar/stat_actime1.go b/src/archive/tar/stat_actime1.go index 1bdd1c9dcb2..4fdf2a04b3d 100644 --- a/src/archive/tar/stat_actime1.go +++ b/src/archive/tar/stat_actime1.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 aix || linux || dragonfly || openbsd || solaris // +build aix linux dragonfly openbsd solaris package tar diff --git a/src/archive/tar/stat_actime2.go b/src/archive/tar/stat_actime2.go index 6f17dbe3072..5a9a35cbb4e 100644 --- a/src/archive/tar/stat_actime2.go +++ b/src/archive/tar/stat_actime2.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 darwin || freebsd || netbsd // +build darwin freebsd netbsd package tar diff --git a/src/archive/tar/stat_unix.go b/src/archive/tar/stat_unix.go index 581d87dca9d..3957349d6ef 100644 --- a/src/archive/tar/stat_unix.go +++ b/src/archive/tar/stat_unix.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 aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris // +build aix linux darwin dragonfly freebsd openbsd netbsd solaris package tar diff --git a/src/bytes/boundary_test.go b/src/bytes/boundary_test.go index ea84f1e40fd..5a47526593b 100644 --- a/src/bytes/boundary_test.go +++ b/src/bytes/boundary_test.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 linux // +build linux package bytes_test diff --git a/src/cmd/api/run.go b/src/cmd/api/run.go index ecb1d0f81aa..8c9fb723a58 100644 --- a/src/cmd/api/run.go +++ b/src/cmd/api/run.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 ignore // +build ignore // The run program is invoked via the dist tool. diff --git a/src/cmd/compile/internal/gc/bootstrap.go b/src/cmd/compile/internal/gc/bootstrap.go index 2e13d6b57ac..37b0d59ede7 100644 --- a/src/cmd/compile/internal/gc/bootstrap.go +++ b/src/cmd/compile/internal/gc/bootstrap.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 !go1.8 // +build !go1.8 package gc diff --git a/src/cmd/compile/internal/gc/pprof.go b/src/cmd/compile/internal/gc/pprof.go index 256c6592591..5f9b030621c 100644 --- a/src/cmd/compile/internal/gc/pprof.go +++ b/src/cmd/compile/internal/gc/pprof.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 go1.8 // +build go1.8 package gc diff --git a/src/cmd/compile/internal/gc/trace.go b/src/cmd/compile/internal/gc/trace.go index c6eb23a0909..8cdbd4b0f3a 100644 --- a/src/cmd/compile/internal/gc/trace.go +++ b/src/cmd/compile/internal/gc/trace.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 go1.7 // +build go1.7 package gc diff --git a/src/cmd/compile/internal/ir/mknode.go b/src/cmd/compile/internal/ir/mknode.go index 326f491a69d..5a0aaadf16f 100644 --- a/src/cmd/compile/internal/ir/mknode.go +++ b/src/cmd/compile/internal/ir/mknode.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 ignore // +build ignore package main diff --git a/src/cmd/compile/internal/logopt/escape.go b/src/cmd/compile/internal/logopt/escape.go index 802f967aa66..9660e938b4a 100644 --- a/src/cmd/compile/internal/logopt/escape.go +++ b/src/cmd/compile/internal/logopt/escape.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 go1.8 // +build go1.8 package logopt diff --git a/src/cmd/compile/internal/logopt/escape_bootstrap.go b/src/cmd/compile/internal/logopt/escape_bootstrap.go index 66ff0b8f220..cc04eaadfd1 100644 --- a/src/cmd/compile/internal/logopt/escape_bootstrap.go +++ b/src/cmd/compile/internal/logopt/escape_bootstrap.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 !go1.8 // +build !go1.8 package logopt diff --git a/src/cmd/compile/internal/ssa/flags_test.go b/src/cmd/compile/internal/ssa/flags_test.go index d64abf652cd..0bc10971994 100644 --- a/src/cmd/compile/internal/ssa/flags_test.go +++ b/src/cmd/compile/internal/ssa/flags_test.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 amd64 || arm64 // +build amd64 arm64 package ssa diff --git a/src/cmd/compile/internal/typecheck/mapfile_mmap.go b/src/cmd/compile/internal/typecheck/mapfile_mmap.go index 2f3aa16decf..298b385bcb0 100644 --- a/src/cmd/compile/internal/typecheck/mapfile_mmap.go +++ b/src/cmd/compile/internal/typecheck/mapfile_mmap.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package typecheck diff --git a/src/cmd/compile/internal/typecheck/mapfile_read.go b/src/cmd/compile/internal/typecheck/mapfile_read.go index 4059f261d49..9637ab97abe 100644 --- a/src/cmd/compile/internal/typecheck/mapfile_read.go +++ b/src/cmd/compile/internal/typecheck/mapfile_read.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 !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd package typecheck diff --git a/src/cmd/compile/internal/typecheck/mkbuiltin.go b/src/cmd/compile/internal/typecheck/mkbuiltin.go index bef510a578a..6dbd1869b3e 100644 --- a/src/cmd/compile/internal/typecheck/mkbuiltin.go +++ b/src/cmd/compile/internal/typecheck/mkbuiltin.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 ignore // +build ignore // Generate builtin.go from builtin/runtime.go. diff --git a/src/cmd/compile/internal/types2/example_test.go b/src/cmd/compile/internal/types2/example_test.go index ffd54fe4591..974acb82ef8 100644 --- a/src/cmd/compile/internal/types2/example_test.go +++ b/src/cmd/compile/internal/types2/example_test.go @@ -6,6 +6,7 @@ // Only run where builders (build.golang.org) have // access to compiled packages for import. // +//go:build !arm && !arm64 // +build !arm,!arm64 package types2_test diff --git a/src/cmd/dist/sys_default.go b/src/cmd/dist/sys_default.go index 821dc273d60..e87c84ce3ee 100644 --- a/src/cmd/dist/sys_default.go +++ b/src/cmd/dist/sys_default.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 main diff --git a/src/cmd/dist/test_linux.go b/src/cmd/dist/test_linux.go index b6d0aedbbf7..43d28dc6619 100644 --- a/src/cmd/dist/test_linux.go +++ b/src/cmd/dist/test_linux.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 linux // +build linux package main diff --git a/src/cmd/dist/util_gc.go b/src/cmd/dist/util_gc.go index 17a0e6fbb56..2db6d3a25e9 100644 --- a/src/cmd/dist/util_gc.go +++ b/src/cmd/dist/util_gc.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 !gccgo // +build !gccgo package main diff --git a/src/cmd/dist/util_gccgo.go b/src/cmd/dist/util_gccgo.go index dc897236fbb..3255b803652 100644 --- a/src/cmd/dist/util_gccgo.go +++ b/src/cmd/dist/util_gccgo.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 gccgo // +build gccgo package main diff --git a/src/cmd/go/go11.go b/src/cmd/go/go11.go index 7e383f4b5b0..a1f2727825e 100644 --- a/src/cmd/go/go11.go +++ b/src/cmd/go/go11.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 go1.1 // +build go1.1 package main diff --git a/src/cmd/go/go_unix_test.go b/src/cmd/go/go_unix_test.go index f6e10ca59c7..7d5ff9bbb74 100644 --- a/src/cmd/go/go_unix_test.go +++ b/src/cmd/go/go_unix_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package main_test diff --git a/src/cmd/go/internal/base/signal_notunix.go b/src/cmd/go/internal/base/signal_notunix.go index 9e869b03ea8..5cc0b0f1011 100644 --- a/src/cmd/go/internal/base/signal_notunix.go +++ b/src/cmd/go/internal/base/signal_notunix.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 plan9 || windows // +build plan9 windows package base diff --git a/src/cmd/go/internal/base/signal_unix.go b/src/cmd/go/internal/base/signal_unix.go index 342775a1182..cdc2658372e 100644 --- a/src/cmd/go/internal/base/signal_unix.go +++ b/src/cmd/go/internal/base/signal_unix.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 aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js linux netbsd openbsd solaris package base diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.go index 1fa4327a89d..a37b2ad6d18 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.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 aix || (solaris && !illumos) // +build aix solaris,!illumos // This code implements the filelock API using POSIX 'fcntl' locks, which attach diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go index bc480343fc3..70f5d7a688a 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.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 !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris && !windows // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!plan9,!solaris,!windows package filelock diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_plan9.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_plan9.go index 0798ee469a4..908afb6c8cb 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_plan9.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_plan9.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 plan9 // +build plan9 package filelock diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go index 2ac2052b8f5..640d4406f42 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.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 !js && !plan9 // +build !js,!plan9 package filelock_test diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.go index ed07bac6088..878a1e770d4 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.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 darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build darwin dragonfly freebsd illumos linux netbsd openbsd package filelock diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_windows.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_windows.go index 19de27eb9b6..dd27ce92bd8 100644 --- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_windows.go +++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_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 filelock diff --git a/src/cmd/go/internal/lockedfile/lockedfile_filelock.go b/src/cmd/go/internal/lockedfile/lockedfile_filelock.go index efc66461ed2..729df5c681c 100644 --- a/src/cmd/go/internal/lockedfile/lockedfile_filelock.go +++ b/src/cmd/go/internal/lockedfile/lockedfile_filelock.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 !plan9 // +build !plan9 package lockedfile diff --git a/src/cmd/go/internal/lockedfile/lockedfile_plan9.go b/src/cmd/go/internal/lockedfile/lockedfile_plan9.go index 70d6eddf2d2..3d4b97d78e5 100644 --- a/src/cmd/go/internal/lockedfile/lockedfile_plan9.go +++ b/src/cmd/go/internal/lockedfile/lockedfile_plan9.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 plan9 // +build plan9 package lockedfile diff --git a/src/cmd/go/internal/lockedfile/lockedfile_test.go b/src/cmd/go/internal/lockedfile/lockedfile_test.go index 34327dd841e..3acc6695a74 100644 --- a/src/cmd/go/internal/lockedfile/lockedfile_test.go +++ b/src/cmd/go/internal/lockedfile/lockedfile_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // js does not support inter-process file locking. +//go:build !js // +build !js package lockedfile_test diff --git a/src/cmd/go/internal/lockedfile/transform_test.go b/src/cmd/go/internal/lockedfile/transform_test.go index 407d48ea4a3..b753346e7da 100644 --- a/src/cmd/go/internal/lockedfile/transform_test.go +++ b/src/cmd/go/internal/lockedfile/transform_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // js does not support inter-process file locking. +//go:build !js // +build !js package lockedfile_test diff --git a/src/cmd/go/internal/modfetch/bootstrap.go b/src/cmd/go/internal/modfetch/bootstrap.go index e4020b0b41e..ed694581a7c 100644 --- a/src/cmd/go/internal/modfetch/bootstrap.go +++ b/src/cmd/go/internal/modfetch/bootstrap.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 cmd_go_bootstrap // +build cmd_go_bootstrap package modfetch diff --git a/src/cmd/go/internal/modfetch/codehost/shell.go b/src/cmd/go/internal/modfetch/codehost/shell.go index ce8b501d53c..0e9f3819667 100644 --- a/src/cmd/go/internal/modfetch/codehost/shell.go +++ b/src/cmd/go/internal/modfetch/codehost/shell.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 ignore // +build ignore // Interactive debugging shell for codehost.Repo implementations. diff --git a/src/cmd/go/internal/modfetch/sumdb.go b/src/cmd/go/internal/modfetch/sumdb.go index 4fbc54d15ce..fbe2bda2e58 100644 --- a/src/cmd/go/internal/modfetch/sumdb.go +++ b/src/cmd/go/internal/modfetch/sumdb.go @@ -4,6 +4,7 @@ // Go checksum database lookup +//go:build !cmd_go_bootstrap // +build !cmd_go_bootstrap package modfetch diff --git a/src/cmd/go/internal/modload/stat_openfile.go b/src/cmd/go/internal/modload/stat_openfile.go index 5842b858f0b..368f8931984 100644 --- a/src/cmd/go/internal/modload/stat_openfile.go +++ b/src/cmd/go/internal/modload/stat_openfile.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 (js && wasm) || plan9 // +build js,wasm plan9 // On plan9, per http://9p.io/magic/man2html/2/access: “Since file permissions diff --git a/src/cmd/go/internal/modload/stat_unix.go b/src/cmd/go/internal/modload/stat_unix.go index f49278ec3a8..e079d739902 100644 --- a/src/cmd/go/internal/modload/stat_unix.go +++ b/src/cmd/go/internal/modload/stat_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package modload diff --git a/src/cmd/go/internal/modload/stat_windows.go b/src/cmd/go/internal/modload/stat_windows.go index 0ac23913475..825e60b27af 100644 --- a/src/cmd/go/internal/modload/stat_windows.go +++ b/src/cmd/go/internal/modload/stat_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 modload diff --git a/src/cmd/go/internal/renameio/renameio_test.go b/src/cmd/go/internal/renameio/renameio_test.go index 5b2ed836242..dc3c1415dbc 100644 --- a/src/cmd/go/internal/renameio/renameio_test.go +++ b/src/cmd/go/internal/renameio/renameio_test.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 !plan9 // +build !plan9 package renameio diff --git a/src/cmd/go/internal/renameio/umask_test.go b/src/cmd/go/internal/renameio/umask_test.go index 65e4fa587b7..bed45af6ed2 100644 --- a/src/cmd/go/internal/renameio/umask_test.go +++ b/src/cmd/go/internal/renameio/umask_test.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 !plan9 && !windows && !js // +build !plan9,!windows,!js package renameio diff --git a/src/cmd/go/internal/robustio/robustio_flaky.go b/src/cmd/go/internal/robustio/robustio_flaky.go index 5bd44bd3453..d5c241857b4 100644 --- a/src/cmd/go/internal/robustio/robustio_flaky.go +++ b/src/cmd/go/internal/robustio/robustio_flaky.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 || darwin // +build windows darwin package robustio diff --git a/src/cmd/go/internal/robustio/robustio_other.go b/src/cmd/go/internal/robustio/robustio_other.go index 6fe7b7e4e4e..3a20cac6cf8 100644 --- a/src/cmd/go/internal/robustio/robustio_other.go +++ b/src/cmd/go/internal/robustio/robustio_other.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 && !darwin // +build !windows,!darwin package robustio diff --git a/src/cmd/go/internal/test/genflags.go b/src/cmd/go/internal/test/genflags.go index 30334b0f305..9277de7fee8 100644 --- a/src/cmd/go/internal/test/genflags.go +++ b/src/cmd/go/internal/test/genflags.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 ignore // +build ignore package main diff --git a/src/cmd/go/internal/web/bootstrap.go b/src/cmd/go/internal/web/bootstrap.go index 781702100a0..08686cdfcf9 100644 --- a/src/cmd/go/internal/web/bootstrap.go +++ b/src/cmd/go/internal/web/bootstrap.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 cmd_go_bootstrap // +build cmd_go_bootstrap // This code is compiled only into the bootstrap 'go' binary. diff --git a/src/cmd/go/internal/web/http.go b/src/cmd/go/internal/web/http.go index 72fa2b2ca6a..a77e0f93176 100644 --- a/src/cmd/go/internal/web/http.go +++ b/src/cmd/go/internal/web/http.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 !cmd_go_bootstrap // +build !cmd_go_bootstrap // This code is compiled into the real 'go' binary, but it is not diff --git a/src/cmd/go/internal/web/url_other.go b/src/cmd/go/internal/web/url_other.go index 2641ee62bfa..453af402b43 100644 --- a/src/cmd/go/internal/web/url_other.go +++ b/src/cmd/go/internal/web/url_other.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 web diff --git a/src/cmd/go/internal/web/url_other_test.go b/src/cmd/go/internal/web/url_other_test.go index aa5663355ef..4d6ed2ec7f8 100644 --- a/src/cmd/go/internal/web/url_other_test.go +++ b/src/cmd/go/internal/web/url_other_test.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 web diff --git a/src/cmd/go/internal/work/testgo.go b/src/cmd/go/internal/work/testgo.go index 931f49a0691..8b77871b23f 100644 --- a/src/cmd/go/internal/work/testgo.go +++ b/src/cmd/go/internal/work/testgo.go @@ -4,6 +4,7 @@ // This file contains extra hooks for testing the go command. +//go:build testgo // +build testgo package work diff --git a/src/cmd/internal/bio/buf_mmap.go b/src/cmd/internal/bio/buf_mmap.go index 4b43d74f269..b9755c7e50e 100644 --- a/src/cmd/internal/bio/buf_mmap.go +++ b/src/cmd/internal/bio/buf_mmap.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package bio diff --git a/src/cmd/internal/bio/buf_nommap.go b/src/cmd/internal/bio/buf_nommap.go index f43c67ac2d8..533a93180cd 100644 --- a/src/cmd/internal/bio/buf_nommap.go +++ b/src/cmd/internal/bio/buf_nommap.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 !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd package bio diff --git a/src/cmd/internal/goobj/mkbuiltin.go b/src/cmd/internal/goobj/mkbuiltin.go index 22608e7e699..4e46970648c 100644 --- a/src/cmd/internal/goobj/mkbuiltin.go +++ b/src/cmd/internal/goobj/mkbuiltin.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 ignore // +build ignore // Generate builtinlist.go from cmd/compile/internal/gc/builtin/runtime.go. diff --git a/src/cmd/internal/obj/stringer.go b/src/cmd/internal/obj/stringer.go index f67b89091c1..a4d507d49aa 100644 --- a/src/cmd/internal/obj/stringer.go +++ b/src/cmd/internal/obj/stringer.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 ignore // +build ignore // This is a mini version of the stringer tool customized for the Anames table diff --git a/src/cmd/link/elf_test.go b/src/cmd/link/elf_test.go index 20754d09f5a..b4441297e6f 100644 --- a/src/cmd/link/elf_test.go +++ b/src/cmd/link/elf_test.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package main diff --git a/src/cmd/link/internal/ld/elf_test.go b/src/cmd/link/internal/ld/elf_test.go index 776fc1b4f97..70e743fa65c 100644 --- a/src/cmd/link/internal/ld/elf_test.go +++ b/src/cmd/link/internal/ld/elf_test.go @@ -1,3 +1,4 @@ +//go:build cgo // +build cgo // Copyright 2019 The Go Authors. All rights reserved. diff --git a/src/cmd/link/internal/ld/execarchive.go b/src/cmd/link/internal/ld/execarchive.go index 4687c624de4..918b86cdc5b 100644 --- a/src/cmd/link/internal/ld/execarchive.go +++ b/src/cmd/link/internal/ld/execarchive.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 !wasm && !windows // +build !wasm,!windows package ld diff --git a/src/cmd/link/internal/ld/execarchive_noexec.go b/src/cmd/link/internal/ld/execarchive_noexec.go index a70dea9fda3..5e1f2669d3c 100644 --- a/src/cmd/link/internal/ld/execarchive_noexec.go +++ b/src/cmd/link/internal/ld/execarchive_noexec.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 wasm || windows // +build wasm windows package ld diff --git a/src/cmd/link/internal/ld/fallocate_test.go b/src/cmd/link/internal/ld/fallocate_test.go index 244b70f0615..56d23218261 100644 --- a/src/cmd/link/internal/ld/fallocate_test.go +++ b/src/cmd/link/internal/ld/fallocate_test.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 darwin || linux // +build darwin linux package ld diff --git a/src/cmd/link/internal/ld/outbuf_mmap.go b/src/cmd/link/internal/ld/outbuf_mmap.go index 807fe243752..40a3222788e 100644 --- a/src/cmd/link/internal/ld/outbuf_mmap.go +++ b/src/cmd/link/internal/ld/outbuf_mmap.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build aix darwin dragonfly freebsd linux netbsd openbsd package ld diff --git a/src/cmd/link/internal/ld/outbuf_nofallocate.go b/src/cmd/link/internal/ld/outbuf_nofallocate.go index 6bf96bcb2ba..6564bd54a3d 100644 --- a/src/cmd/link/internal/ld/outbuf_nofallocate.go +++ b/src/cmd/link/internal/ld/outbuf_nofallocate.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 !darwin && !linux // +build !darwin,!linux package ld diff --git a/src/cmd/link/internal/ld/outbuf_nommap.go b/src/cmd/link/internal/ld/outbuf_nommap.go index 6b4025384b4..c870fa2c182 100644 --- a/src/cmd/link/internal/ld/outbuf_nommap.go +++ b/src/cmd/link/internal/ld/outbuf_nommap.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 !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !windows // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows package ld diff --git a/src/cmd/link/internal/ld/outbuf_notdarwin.go b/src/cmd/link/internal/ld/outbuf_notdarwin.go index 8c5666f216d..f9caa413e3c 100644 --- a/src/cmd/link/internal/ld/outbuf_notdarwin.go +++ b/src/cmd/link/internal/ld/outbuf_notdarwin.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 !darwin // +build !darwin package ld diff --git a/src/cmd/nm/nm_cgo_test.go b/src/cmd/nm/nm_cgo_test.go index e0414e6b222..536e87e4ae0 100644 --- a/src/cmd/nm/nm_cgo_test.go +++ b/src/cmd/nm/nm_cgo_test.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 cgo // +build cgo package main diff --git a/src/cmd/pprof/readlineui.go b/src/cmd/pprof/readlineui.go index 0c9fafdad75..dbbb9c27876 100644 --- a/src/cmd/pprof/readlineui.go +++ b/src/cmd/pprof/readlineui.go @@ -5,6 +5,7 @@ // This file contains a driver.UI implementation // that provides the readline functionality if possible. +//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows) && !appengine && !android // +build darwin dragonfly freebsd linux netbsd openbsd solaris windows // +build !appengine // +build !android diff --git a/src/cmd/trace/annotations_test.go b/src/cmd/trace/annotations_test.go index 9c2d0273668..acd5693c7d5 100644 --- a/src/cmd/trace/annotations_test.go +++ b/src/cmd/trace/annotations_test.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 !js // +build !js package main diff --git a/src/cmd/trace/trace_test.go b/src/cmd/trace/trace_test.go index ea0cc6f8800..2b1a68d7f3d 100644 --- a/src/cmd/trace/trace_test.go +++ b/src/cmd/trace/trace_test.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 !js // +build !js package main diff --git a/src/cmd/trace/trace_unix_test.go b/src/cmd/trace/trace_unix_test.go index c569b40bb24..8dc56a8c7be 100644 --- a/src/cmd/trace/trace_unix_test.go +++ b/src/cmd/trace/trace_unix_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package main diff --git a/src/crypto/aes/aes_gcm.go b/src/crypto/aes/aes_gcm.go index 49b78c3a8be..1de0e457a26 100644 --- a/src/crypto/aes/aes_gcm.go +++ b/src/crypto/aes/aes_gcm.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 amd64 || arm64 // +build amd64 arm64 package aes diff --git a/src/crypto/aes/cipher_asm.go b/src/crypto/aes/cipher_asm.go index 646bdfa5c0e..4251805ef9b 100644 --- a/src/crypto/aes/cipher_asm.go +++ b/src/crypto/aes/cipher_asm.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 amd64 || arm64 // +build amd64 arm64 package aes diff --git a/src/crypto/aes/cipher_generic.go b/src/crypto/aes/cipher_generic.go index 80a68b4ef0c..22ce3be7f3c 100644 --- a/src/crypto/aes/cipher_generic.go +++ b/src/crypto/aes/cipher_generic.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 !amd64 && !s390x && !ppc64le && !arm64 // +build !amd64,!s390x,!ppc64le,!arm64 package aes diff --git a/src/crypto/aes/gcm_ppc64le.go b/src/crypto/aes/gcm_ppc64le.go index 084edddc4d8..01b4e087573 100644 --- a/src/crypto/aes/gcm_ppc64le.go +++ b/src/crypto/aes/gcm_ppc64le.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 ppc64le // +build ppc64le package aes diff --git a/src/crypto/cipher/xor_generic.go b/src/crypto/cipher/xor_generic.go index ca9c4bbf391..03208402d79 100644 --- a/src/crypto/cipher/xor_generic.go +++ b/src/crypto/cipher/xor_generic.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 !amd64 && !ppc64 && !ppc64le && !arm64 // +build !amd64,!ppc64,!ppc64le,!arm64 package cipher diff --git a/src/crypto/cipher/xor_ppc64x.go b/src/crypto/cipher/xor_ppc64x.go index 8d2e43d3276..f520208a379 100644 --- a/src/crypto/cipher/xor_ppc64x.go +++ b/src/crypto/cipher/xor_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package cipher diff --git a/src/crypto/ecdsa/ecdsa_noasm.go b/src/crypto/ecdsa/ecdsa_noasm.go index 72196211e55..68670a4f93f 100644 --- a/src/crypto/ecdsa/ecdsa_noasm.go +++ b/src/crypto/ecdsa/ecdsa_noasm.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 !s390x // +build !s390x package ecdsa diff --git a/src/crypto/ecdsa/ecdsa_s390x_test.go b/src/crypto/ecdsa/ecdsa_s390x_test.go index a434575dbcd..e8b16b3668b 100644 --- a/src/crypto/ecdsa/ecdsa_s390x_test.go +++ b/src/crypto/ecdsa/ecdsa_s390x_test.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 s390x // +build s390x package ecdsa diff --git a/src/crypto/elliptic/fuzz_test.go b/src/crypto/elliptic/fuzz_test.go index b9209a789bf..f5c9841a126 100644 --- a/src/crypto/elliptic/fuzz_test.go +++ b/src/crypto/elliptic/fuzz_test.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 amd64 || arm64 || ppc64le // +build amd64 arm64 ppc64le package elliptic diff --git a/src/crypto/elliptic/p256.go b/src/crypto/elliptic/p256.go index c23e414156f..3bb7bb70b69 100644 --- a/src/crypto/elliptic/p256.go +++ b/src/crypto/elliptic/p256.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 !amd64 && !arm64 // +build !amd64,!arm64 package elliptic diff --git a/src/crypto/elliptic/p256_asm.go b/src/crypto/elliptic/p256_asm.go index 6cf7742e1b4..c405718b5e0 100644 --- a/src/crypto/elliptic/p256_asm.go +++ b/src/crypto/elliptic/p256_asm.go @@ -10,6 +10,7 @@ // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x // https://eprint.iacr.org/2013/816.pdf +//go:build amd64 || arm64 // +build amd64 arm64 package elliptic diff --git a/src/crypto/elliptic/p256_generic.go b/src/crypto/elliptic/p256_generic.go index f74c607a88f..8ad56638e95 100644 --- a/src/crypto/elliptic/p256_generic.go +++ b/src/crypto/elliptic/p256_generic.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 !amd64 && !s390x && !arm64 && !ppc64le // +build !amd64,!s390x,!arm64,!ppc64le package elliptic diff --git a/src/crypto/elliptic/p256_ppc64le.go b/src/crypto/elliptic/p256_ppc64le.go index 160bdb12e32..40d9ed9d40f 100644 --- a/src/crypto/elliptic/p256_ppc64le.go +++ b/src/crypto/elliptic/p256_ppc64le.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 ppc64le // +build ppc64le package elliptic diff --git a/src/crypto/elliptic/p256_s390x.go b/src/crypto/elliptic/p256_s390x.go index 0d9478bfd6a..91e613b6310 100644 --- a/src/crypto/elliptic/p256_s390x.go +++ b/src/crypto/elliptic/p256_s390x.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 s390x // +build s390x package elliptic diff --git a/src/crypto/internal/subtle/aliasing.go b/src/crypto/internal/subtle/aliasing.go index 812ce3c6552..86e0f3cfe70 100644 --- a/src/crypto/internal/subtle/aliasing.go +++ b/src/crypto/internal/subtle/aliasing.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 !appengine // +build !appengine // Package subtle implements functions that are often useful in cryptographic diff --git a/src/crypto/internal/subtle/aliasing_appengine.go b/src/crypto/internal/subtle/aliasing_appengine.go index 844f901d18e..35b442f7a23 100644 --- a/src/crypto/internal/subtle/aliasing_appengine.go +++ b/src/crypto/internal/subtle/aliasing_appengine.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 appengine // +build appengine // Package subtle implements functions that are often useful in cryptographic diff --git a/src/crypto/md5/gen.go b/src/crypto/md5/gen.go index 1468924cbc0..29729fad015 100644 --- a/src/crypto/md5/gen.go +++ b/src/crypto/md5/gen.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 ignore // +build ignore // This program generates md5block.go diff --git a/src/crypto/md5/md5block_decl.go b/src/crypto/md5/md5block_decl.go index f251e03d7ff..bc2d58c0694 100644 --- a/src/crypto/md5/md5block_decl.go +++ b/src/crypto/md5/md5block_decl.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 amd64 || 386 || arm || ppc64le || ppc64 || s390x || arm64 // +build amd64 386 arm ppc64le ppc64 s390x arm64 package md5 diff --git a/src/crypto/md5/md5block_generic.go b/src/crypto/md5/md5block_generic.go index 0b46e70b604..ea4fbcd0b41 100644 --- a/src/crypto/md5/md5block_generic.go +++ b/src/crypto/md5/md5block_generic.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 !amd64 && !386 && !arm && !ppc64le && !ppc64 && !s390x && !arm64 // +build !amd64,!386,!arm,!ppc64le,!ppc64,!s390x,!arm64 package md5 diff --git a/src/crypto/rand/eagain.go b/src/crypto/rand/eagain.go index c9499715dc1..85d4d9d47f9 100644 --- a/src/crypto/rand/eagain.go +++ b/src/crypto/rand/eagain.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package rand diff --git a/src/crypto/rand/rand_batched.go b/src/crypto/rand/rand_batched.go index 60267fd4bc2..45e9351a315 100644 --- a/src/crypto/rand/rand_batched.go +++ b/src/crypto/rand/rand_batched.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 linux || freebsd // +build linux freebsd package rand diff --git a/src/crypto/rand/rand_batched_test.go b/src/crypto/rand/rand_batched_test.go index 837db83f770..fd50735c7de 100644 --- a/src/crypto/rand/rand_batched_test.go +++ b/src/crypto/rand/rand_batched_test.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 linux || freebsd // +build linux freebsd package rand diff --git a/src/crypto/rand/rand_js.go b/src/crypto/rand/rand_js.go index 7e939742ac6..7ddc2b6169c 100644 --- a/src/crypto/rand/rand_js.go +++ b/src/crypto/rand/rand_js.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 js && wasm // +build js,wasm package rand diff --git a/src/crypto/rand/rand_unix.go b/src/crypto/rand/rand_unix.go index 548a5e4cb9a..81277eb6a5d 100644 --- a/src/crypto/rand/rand_unix.go +++ b/src/crypto/rand/rand_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || plan9 || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd plan9 solaris // Unix cryptographically secure pseudorandom number diff --git a/src/crypto/sha1/fallback_test.go b/src/crypto/sha1/fallback_test.go index 08acd044d01..4bb8b3324f2 100644 --- a/src/crypto/sha1/fallback_test.go +++ b/src/crypto/sha1/fallback_test.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 s390x // +build s390x package sha1 diff --git a/src/crypto/sha1/issue15617_test.go b/src/crypto/sha1/issue15617_test.go index 98038e58077..436f78c7453 100644 --- a/src/crypto/sha1/issue15617_test.go +++ b/src/crypto/sha1/issue15617_test.go @@ -1,3 +1,4 @@ +//go:build amd64 && (linux || darwin) // +build amd64 // +build linux darwin diff --git a/src/crypto/sha1/sha1block_decl.go b/src/crypto/sha1/sha1block_decl.go index 9c7df4e40a7..93054efa7c1 100644 --- a/src/crypto/sha1/sha1block_decl.go +++ b/src/crypto/sha1/sha1block_decl.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 arm || 386 || s390x // +build arm 386 s390x package sha1 diff --git a/src/crypto/sha1/sha1block_generic.go b/src/crypto/sha1/sha1block_generic.go index f95ea0eee4d..feaba5a23ab 100644 --- a/src/crypto/sha1/sha1block_generic.go +++ b/src/crypto/sha1/sha1block_generic.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 !amd64 && !386 && !arm && !s390x && !arm64 // +build !amd64,!386,!arm,!s390x,!arm64 package sha1 diff --git a/src/crypto/sha256/fallback_test.go b/src/crypto/sha256/fallback_test.go index 5917a4862af..7ce88cbb2a8 100644 --- a/src/crypto/sha256/fallback_test.go +++ b/src/crypto/sha256/fallback_test.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 s390x // +build s390x package sha256 diff --git a/src/crypto/sha256/sha256block_decl.go b/src/crypto/sha256/sha256block_decl.go index fe07e53b845..a6bb396f133 100644 --- a/src/crypto/sha256/sha256block_decl.go +++ b/src/crypto/sha256/sha256block_decl.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 386 || amd64 || s390x || ppc64le // +build 386 amd64 s390x ppc64le package sha256 diff --git a/src/crypto/sha256/sha256block_generic.go b/src/crypto/sha256/sha256block_generic.go index 61362f41260..620c048b93c 100644 --- a/src/crypto/sha256/sha256block_generic.go +++ b/src/crypto/sha256/sha256block_generic.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 !amd64 && !386 && !s390x && !ppc64le && !arm64 // +build !amd64,!386,!s390x,!ppc64le,!arm64 package sha256 diff --git a/src/crypto/sha512/fallback_test.go b/src/crypto/sha512/fallback_test.go index 9024ce668a0..faf732670ad 100644 --- a/src/crypto/sha512/fallback_test.go +++ b/src/crypto/sha512/fallback_test.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 s390x // +build s390x package sha512 diff --git a/src/crypto/sha512/sha512block_amd64.go b/src/crypto/sha512/sha512block_amd64.go index 18151cea245..e2386f29ab6 100644 --- a/src/crypto/sha512/sha512block_amd64.go +++ b/src/crypto/sha512/sha512block_amd64.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 amd64 // +build amd64 package sha512 diff --git a/src/crypto/sha512/sha512block_decl.go b/src/crypto/sha512/sha512block_decl.go index 613d1e02a36..6c22f44801b 100644 --- a/src/crypto/sha512/sha512block_decl.go +++ b/src/crypto/sha512/sha512block_decl.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 s390x || ppc64le // +build s390x ppc64le package sha512 diff --git a/src/crypto/sha512/sha512block_generic.go b/src/crypto/sha512/sha512block_generic.go index 3eabd2c7c01..865a7356f1e 100644 --- a/src/crypto/sha512/sha512block_generic.go +++ b/src/crypto/sha512/sha512block_generic.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 !amd64 && !s390x && !ppc64le // +build !amd64,!s390x,!ppc64le package sha512 diff --git a/src/crypto/tls/generate_cert.go b/src/crypto/tls/generate_cert.go index 1857185fe4d..7ea90f8a7b5 100644 --- a/src/crypto/tls/generate_cert.go +++ b/src/crypto/tls/generate_cert.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 ignore // +build ignore // Generate a self-signed X.509 certificate for a TLS server. Outputs to diff --git a/src/crypto/tls/handshake_unix_test.go b/src/crypto/tls/handshake_unix_test.go index 72718544ae6..19fc6986769 100644 --- a/src/crypto/tls/handshake_unix_test.go +++ b/src/crypto/tls/handshake_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package tls diff --git a/src/crypto/x509/internal/macos/corefoundation.go b/src/crypto/x509/internal/macos/corefoundation.go index 0572c6ccd81..abcdcdd91e4 100644 --- a/src/crypto/x509/internal/macos/corefoundation.go +++ b/src/crypto/x509/internal/macos/corefoundation.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 darwin && !ios // +build darwin,!ios // Package macOS provides cgo-less wrappers for Core Foundation and diff --git a/src/crypto/x509/internal/macos/security.go b/src/crypto/x509/internal/macos/security.go index 3163e3a4f72..f346ff4c7fd 100644 --- a/src/crypto/x509/internal/macos/security.go +++ b/src/crypto/x509/internal/macos/security.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 darwin && !ios // +build darwin,!ios package macOS diff --git a/src/crypto/x509/root_bsd.go b/src/crypto/x509/root_bsd.go index f04b6bd0d66..822e8573ff1 100644 --- a/src/crypto/x509/root_bsd.go +++ b/src/crypto/x509/root_bsd.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 dragonfly || freebsd || netbsd || openbsd // +build dragonfly freebsd netbsd openbsd package x509 diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go index c9ea7e80f37..05593bb1055 100644 --- a/src/crypto/x509/root_darwin.go +++ b/src/crypto/x509/root_darwin.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 !ios // +build !ios package x509 diff --git a/src/crypto/x509/root_ios.go b/src/crypto/x509/root_ios.go index d2dfb62b77c..50432f3d2c5 100644 --- a/src/crypto/x509/root_ios.go +++ b/src/crypto/x509/root_ios.go @@ -1,8 +1,8 @@ // Code generated by root_ios_gen.go -version 55188.40.9; DO NOT EDIT. // Update the version in root.go and regenerate with "go generate". -// +build ios -// +build !x509omitbundledroots +//go:build ios && !x509omitbundledroots +// +build ios,!x509omitbundledroots package x509 diff --git a/src/crypto/x509/root_ios_gen.go b/src/crypto/x509/root_ios_gen.go index 8bc6e7d9c47..05bd672d5d8 100644 --- a/src/crypto/x509/root_ios_gen.go +++ b/src/crypto/x509/root_ios_gen.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 ignore // +build ignore // Generates root_ios.go. diff --git a/src/crypto/x509/root_js.go b/src/crypto/x509/root_js.go index 4e537a4fe5e..f2c2c0af380 100644 --- a/src/crypto/x509/root_js.go +++ b/src/crypto/x509/root_js.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 js && wasm // +build js,wasm package x509 diff --git a/src/crypto/x509/root_omit.go b/src/crypto/x509/root_omit.go index 0055b3b8627..81f2f112d07 100644 --- a/src/crypto/x509/root_omit.go +++ b/src/crypto/x509/root_omit.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 ((darwin && arm64) || (darwin && amd64 && ios)) && x509omitbundledroots // +build darwin,arm64 darwin,amd64,ios // +build x509omitbundledroots diff --git a/src/crypto/x509/root_omit_test.go b/src/crypto/x509/root_omit_test.go index 5ab6c931deb..158bd7f91ae 100644 --- a/src/crypto/x509/root_omit_test.go +++ b/src/crypto/x509/root_omit_test.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 ((darwin && arm64) || (darwin && amd64 && ios)) && x509omitbundledroots // +build darwin,arm64 darwin,amd64,ios // +build x509omitbundledroots diff --git a/src/crypto/x509/root_plan9.go b/src/crypto/x509/root_plan9.go index 2dc4aaf5d7a..2bdb2fe7136 100644 --- a/src/crypto/x509/root_plan9.go +++ b/src/crypto/x509/root_plan9.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 plan9 // +build plan9 package x509 diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go index 262fc079d51..dede825eddf 100644 --- a/src/crypto/x509/root_unix.go +++ b/src/crypto/x509/root_unix.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 aix || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris package x509 diff --git a/src/crypto/x509/root_unix_test.go b/src/crypto/x509/root_unix_test.go index 878ed7c2faf..38038a65f3e 100644 --- a/src/crypto/x509/root_unix_test.go +++ b/src/crypto/x509/root_unix_test.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 dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build dragonfly freebsd linux netbsd openbsd solaris package x509 diff --git a/src/crypto/x509/x509_test_import.go b/src/crypto/x509/x509_test_import.go index b778df261aa..ef3ee807bf0 100644 --- a/src/crypto/x509/x509_test_import.go +++ b/src/crypto/x509/x509_test_import.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 ignore // +build ignore // This file is run by the x509 tests to ensure that a program with minimal diff --git a/src/debug/pe/file_cgo_test.go b/src/debug/pe/file_cgo_test.go index 739671d73f1..bba3a068d64 100644 --- a/src/debug/pe/file_cgo_test.go +++ b/src/debug/pe/file_cgo_test.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 cgo // +build cgo package pe diff --git a/src/encoding/csv/fuzz.go b/src/encoding/csv/fuzz.go index 8be21d5d289..a03fa83d8ce 100644 --- a/src/encoding/csv/fuzz.go +++ b/src/encoding/csv/fuzz.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 gofuzz // +build gofuzz package csv diff --git a/src/encoding/gob/debug.go b/src/encoding/gob/debug.go index 8f93742f499..5965fea921f 100644 --- a/src/encoding/gob/debug.go +++ b/src/encoding/gob/debug.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // Delete the next line to include in the gob package. +//go:build ignore // +build ignore package gob diff --git a/src/encoding/gob/decgen.go b/src/encoding/gob/decgen.go index 1c31e66625f..994be877d93 100644 --- a/src/encoding/gob/decgen.go +++ b/src/encoding/gob/decgen.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 ignore // +build ignore // encgen writes the helper functions for encoding. Intended to be diff --git a/src/encoding/gob/dump.go b/src/encoding/gob/dump.go index 17238c98df0..8c0bbc4ff2e 100644 --- a/src/encoding/gob/dump.go +++ b/src/encoding/gob/dump.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 ignore // +build ignore package main diff --git a/src/encoding/gob/encgen.go b/src/encoding/gob/encgen.go index 409b8c9d952..b562da177db 100644 --- a/src/encoding/gob/encgen.go +++ b/src/encoding/gob/encgen.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 ignore // +build ignore // encgen writes the helper functions for encoding. Intended to be diff --git a/src/encoding/json/fuzz.go b/src/encoding/json/fuzz.go index be03f0d7ffc..d3fa2d11138 100644 --- a/src/encoding/json/fuzz.go +++ b/src/encoding/json/fuzz.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 gofuzz // +build gofuzz package json diff --git a/src/go/build/gc.go b/src/go/build/gc.go index 3025cd56815..e16e186e0df 100644 --- a/src/go/build/gc.go +++ b/src/go/build/gc.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 gc // +build gc package build diff --git a/src/go/build/gccgo.go b/src/go/build/gccgo.go index c6aac9aa1bc..c8ec7041fb3 100644 --- a/src/go/build/gccgo.go +++ b/src/go/build/gccgo.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 gccgo // +build gccgo package build diff --git a/src/go/doc/headscan.go b/src/go/doc/headscan.go index fe26a0ea842..28cb84f91da 100644 --- a/src/go/doc/headscan.go +++ b/src/go/doc/headscan.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 ignore // +build ignore /* diff --git a/src/go/types/example_test.go b/src/go/types/example_test.go index 3747f3b15a0..32a25a41176 100644 --- a/src/go/types/example_test.go +++ b/src/go/types/example_test.go @@ -5,6 +5,7 @@ // Only run where builders (build.golang.org) have // access to compiled packages for import. // +//go:build !arm && !arm64 // +build !arm,!arm64 package types_test diff --git a/src/go/types/gotype.go b/src/go/types/gotype.go index 52709df17bd..ca1d42c14d5 100644 --- a/src/go/types/gotype.go +++ b/src/go/types/gotype.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 ignore // +build ignore // Build this command explicitly: go build gotype.go diff --git a/src/hash/crc32/crc32_otherarch.go b/src/hash/crc32/crc32_otherarch.go index 1a5e542ab6d..936e5bf3e0c 100644 --- a/src/hash/crc32/crc32_otherarch.go +++ b/src/hash/crc32/crc32_otherarch.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 !amd64 && !s390x && !ppc64le && !arm64 // +build !amd64,!s390x,!ppc64le,!arm64 package crc32 diff --git a/src/hash/crc32/gen_const_ppc64le.go b/src/hash/crc32/gen_const_ppc64le.go index d7af018af48..c98454c6850 100644 --- a/src/hash/crc32/gen_const_ppc64le.go +++ b/src/hash/crc32/gen_const_ppc64le.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 ignore // +build ignore // Generate the constant table associated with the poly used by the diff --git a/src/html/fuzz.go b/src/html/fuzz.go index ffa3e257f40..ecaf4f90694 100644 --- a/src/html/fuzz.go +++ b/src/html/fuzz.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 gofuzz // +build gofuzz package html diff --git a/src/image/color/palette/gen.go b/src/image/color/palette/gen.go index 3243e539819..7bb257d865f 100644 --- a/src/image/color/palette/gen.go +++ b/src/image/color/palette/gen.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 ignore // +build ignore package main diff --git a/src/image/internal/imageutil/gen.go b/src/image/internal/imageutil/gen.go index 36de5dc9cc6..38f41303fa7 100644 --- a/src/image/internal/imageutil/gen.go +++ b/src/image/internal/imageutil/gen.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 ignore // +build ignore package main diff --git a/src/image/png/fuzz.go b/src/image/png/fuzz.go index d9cb3921e57..6508533f444 100644 --- a/src/image/png/fuzz.go +++ b/src/image/png/fuzz.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 gofuzz // +build gofuzz package png diff --git a/src/index/suffixarray/gen.go b/src/index/suffixarray/gen.go index 94184d71b68..3bc9b1e2aea 100644 --- a/src/index/suffixarray/gen.go +++ b/src/index/suffixarray/gen.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 ignore // +build ignore // Gen generates sais2.go by duplicating functions in sais.go diff --git a/src/internal/abi/abi_amd64.go b/src/internal/abi/abi_amd64.go index 70e2ed1feb9..77589d4c34f 100644 --- a/src/internal/abi/abi_amd64.go +++ b/src/internal/abi/abi_amd64.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 goexperiment.regabi // +build goexperiment.regabi package abi diff --git a/src/internal/abi/abi_generic.go b/src/internal/abi/abi_generic.go index 5ef9883dc6e..1e36f36e806 100644 --- a/src/internal/abi/abi_generic.go +++ b/src/internal/abi/abi_generic.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 !goexperiment.regabi // +build !goexperiment.regabi package abi diff --git a/src/internal/bytealg/compare_generic.go b/src/internal/bytealg/compare_generic.go index bd4489a6b9c..0690d0cf31c 100644 --- a/src/internal/bytealg/compare_generic.go +++ b/src/internal/bytealg/compare_generic.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 !386 && !amd64 && !s390x && !arm && !arm64 && !ppc64 && !ppc64le && !mips && !mipsle && !wasm && !mips64 && !mips64le // +build !386,!amd64,!s390x,!arm,!arm64,!ppc64,!ppc64le,!mips,!mipsle,!wasm,!mips64,!mips64le package bytealg diff --git a/src/internal/bytealg/compare_native.go b/src/internal/bytealg/compare_native.go index b53ba97463f..baa188ff7af 100644 --- a/src/internal/bytealg/compare_native.go +++ b/src/internal/bytealg/compare_native.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 386 || amd64 || s390x || arm || arm64 || ppc64 || ppc64le || mips || mipsle || wasm || mips64 || mips64le // +build 386 amd64 s390x arm arm64 ppc64 ppc64le mips mipsle wasm mips64 mips64le package bytealg diff --git a/src/internal/bytealg/count_generic.go b/src/internal/bytealg/count_generic.go index 5575e81ab8d..1891d29b24c 100644 --- a/src/internal/bytealg/count_generic.go +++ b/src/internal/bytealg/count_generic.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 !amd64 && !arm && !arm64 && !ppc64le && !ppc64 && !riscv64 && !s390x // +build !amd64,!arm,!arm64,!ppc64le,!ppc64,!riscv64,!s390x package bytealg diff --git a/src/internal/bytealg/count_native.go b/src/internal/bytealg/count_native.go index b1ff1d265a2..a19a6f8223f 100644 --- a/src/internal/bytealg/count_native.go +++ b/src/internal/bytealg/count_native.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 amd64 || arm || arm64 || ppc64le || ppc64 || riscv64 || s390x // +build amd64 arm arm64 ppc64le ppc64 riscv64 s390x package bytealg diff --git a/src/internal/bytealg/index_generic.go b/src/internal/bytealg/index_generic.go index 98e859f9255..2b8b139aeb8 100644 --- a/src/internal/bytealg/index_generic.go +++ b/src/internal/bytealg/index_generic.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 !amd64 && !arm64 && !s390x // +build !amd64,!arm64,!s390x package bytealg diff --git a/src/internal/bytealg/index_native.go b/src/internal/bytealg/index_native.go index fde42142458..af56d8a2948 100644 --- a/src/internal/bytealg/index_native.go +++ b/src/internal/bytealg/index_native.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 amd64 || arm64 || s390x // +build amd64 arm64 s390x package bytealg diff --git a/src/internal/bytealg/indexbyte_generic.go b/src/internal/bytealg/indexbyte_generic.go index 0b012a8850a..6ef639fafdc 100644 --- a/src/internal/bytealg/indexbyte_generic.go +++ b/src/internal/bytealg/indexbyte_generic.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 !386 && !amd64 && !s390x && !arm && !arm64 && !ppc64 && !ppc64le && !mips && !mipsle && !mips64 && !mips64le && !riscv64 && !wasm // +build !386,!amd64,!s390x,!arm,!arm64,!ppc64,!ppc64le,!mips,!mipsle,!mips64,!mips64le,!riscv64,!wasm package bytealg diff --git a/src/internal/bytealg/indexbyte_native.go b/src/internal/bytealg/indexbyte_native.go index f96c5be4910..965f38fe527 100644 --- a/src/internal/bytealg/indexbyte_native.go +++ b/src/internal/bytealg/indexbyte_native.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 386 || amd64 || s390x || arm || arm64 || ppc64 || ppc64le || mips || mipsle || mips64 || mips64le || riscv64 || wasm // +build 386 amd64 s390x arm arm64 ppc64 ppc64le mips mipsle mips64 mips64le riscv64 wasm package bytealg diff --git a/src/internal/cpu/cpu_arm64_android.go b/src/internal/cpu/cpu_arm64_android.go index 3c9e57c52aa..ac6eee54b21 100644 --- a/src/internal/cpu/cpu_arm64_android.go +++ b/src/internal/cpu/cpu_arm64_android.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 arm64 // +build arm64 package cpu diff --git a/src/internal/cpu/cpu_arm64_darwin.go b/src/internal/cpu/cpu_arm64_darwin.go index e094b97f973..ce1b250a189 100644 --- a/src/internal/cpu/cpu_arm64_darwin.go +++ b/src/internal/cpu/cpu_arm64_darwin.go @@ -2,9 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build arm64 -// +build darwin -// +build !ios +//go:build arm64 && darwin && !ios +// +build arm64,darwin,!ios package cpu diff --git a/src/internal/cpu/cpu_arm64_freebsd.go b/src/internal/cpu/cpu_arm64_freebsd.go index 9de2005c2e3..8c481370da6 100644 --- a/src/internal/cpu/cpu_arm64_freebsd.go +++ b/src/internal/cpu/cpu_arm64_freebsd.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 arm64 // +build arm64 package cpu diff --git a/src/internal/cpu/cpu_arm64_hwcap.go b/src/internal/cpu/cpu_arm64_hwcap.go index fdaf43e1a25..8ac04fd8f97 100644 --- a/src/internal/cpu/cpu_arm64_hwcap.go +++ b/src/internal/cpu/cpu_arm64_hwcap.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build arm64 -// +build linux +//go:build arm64 && linux +// +build arm64,linux package cpu diff --git a/src/internal/cpu/cpu_arm64_linux.go b/src/internal/cpu/cpu_arm64_linux.go index 2f7411ff1e1..c3a3f9a8e9d 100644 --- a/src/internal/cpu/cpu_arm64_linux.go +++ b/src/internal/cpu/cpu_arm64_linux.go @@ -2,9 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build arm64 -// +build linux -// +build !android +//go:build arm64 && linux && !android +// +build arm64,linux,!android package cpu diff --git a/src/internal/cpu/cpu_arm64_other.go b/src/internal/cpu/cpu_arm64_other.go index f191db28d2a..e8b5d529a4b 100644 --- a/src/internal/cpu/cpu_arm64_other.go +++ b/src/internal/cpu/cpu_arm64_other.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 arm64 && !linux && !freebsd && !android && (!darwin || ios) // +build arm64 // +build !linux // +build !freebsd diff --git a/src/internal/cpu/cpu_mips64x.go b/src/internal/cpu/cpu_mips64x.go index 0c4794a70ac..d2f9d4499ba 100644 --- a/src/internal/cpu/cpu_mips64x.go +++ b/src/internal/cpu/cpu_mips64x.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 mips64 || mips64le // +build mips64 mips64le package cpu diff --git a/src/internal/cpu/cpu_no_name.go b/src/internal/cpu/cpu_no_name.go index ce1c37a3c7c..8d563b536c3 100644 --- a/src/internal/cpu/cpu_no_name.go +++ b/src/internal/cpu/cpu_no_name.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !386 -// +build !amd64 +//go:build !386 && !amd64 +// +build !386,!amd64 package cpu diff --git a/src/internal/cpu/cpu_ppc64x.go b/src/internal/cpu/cpu_ppc64x.go index beb1765427e..2e7fd3ebb9f 100644 --- a/src/internal/cpu/cpu_ppc64x.go +++ b/src/internal/cpu/cpu_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package cpu diff --git a/src/internal/cpu/cpu_ppc64x_aix.go b/src/internal/cpu/cpu_ppc64x_aix.go index b840b823bae..3d17a9c7304 100644 --- a/src/internal/cpu/cpu_ppc64x_aix.go +++ b/src/internal/cpu/cpu_ppc64x_aix.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 ppc64 || ppc64le // +build ppc64 ppc64le package cpu diff --git a/src/internal/cpu/cpu_ppc64x_linux.go b/src/internal/cpu/cpu_ppc64x_linux.go index 73b191436df..b7c73451118 100644 --- a/src/internal/cpu/cpu_ppc64x_linux.go +++ b/src/internal/cpu/cpu_ppc64x_linux.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 ppc64 || ppc64le // +build ppc64 ppc64le package cpu diff --git a/src/internal/cpu/cpu_x86.go b/src/internal/cpu/cpu_x86.go index ba6bf690342..fd1217a05d7 100644 --- a/src/internal/cpu/cpu_x86.go +++ b/src/internal/cpu/cpu_x86.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 386 || amd64 // +build 386 amd64 package cpu diff --git a/src/internal/cpu/cpu_x86_test.go b/src/internal/cpu/cpu_x86_test.go index 61db93bd517..e3e16cc1612 100644 --- a/src/internal/cpu/cpu_x86_test.go +++ b/src/internal/cpu/cpu_x86_test.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 386 || amd64 // +build 386 amd64 package cpu_test diff --git a/src/internal/goroot/gc.go b/src/internal/goroot/gc.go index ce72bc38965..2338b78f3aa 100644 --- a/src/internal/goroot/gc.go +++ b/src/internal/goroot/gc.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 gc // +build gc package goroot diff --git a/src/internal/goroot/gccgo.go b/src/internal/goroot/gccgo.go index 3530e59a15f..b1041da11d8 100644 --- a/src/internal/goroot/gccgo.go +++ b/src/internal/goroot/gccgo.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 gccgo // +build gccgo package goroot diff --git a/src/internal/poll/errno_unix.go b/src/internal/poll/errno_unix.go index 0b23fc32106..55c548824f8 100644 --- a/src/internal/poll/errno_unix.go +++ b/src/internal/poll/errno_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package poll diff --git a/src/internal/poll/errno_windows.go b/src/internal/poll/errno_windows.go index e3bddb4bb27..c55f5f0df50 100644 --- a/src/internal/poll/errno_windows.go +++ b/src/internal/poll/errno_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 poll diff --git a/src/internal/poll/error_stub_test.go b/src/internal/poll/error_stub_test.go index c40ffcd20f3..bcc25dd666a 100644 --- a/src/internal/poll/error_stub_test.go +++ b/src/internal/poll/error_stub_test.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 !linux // +build !linux package poll_test diff --git a/src/internal/poll/export_posix_test.go b/src/internal/poll/export_posix_test.go index abadf509300..f59c1f6dfab 100644 --- a/src/internal/poll/export_posix_test.go +++ b/src/internal/poll/export_posix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows // Export guts for testing on posix. diff --git a/src/internal/poll/fcntl_js.go b/src/internal/poll/fcntl_js.go index 120fc1195fe..7bf0ddc792f 100644 --- a/src/internal/poll/fcntl_js.go +++ b/src/internal/poll/fcntl_js.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 js && wasm // +build js,wasm package poll diff --git a/src/internal/poll/fcntl_libc.go b/src/internal/poll/fcntl_libc.go index 642472bc2ba..cc609e48ad7 100644 --- a/src/internal/poll/fcntl_libc.go +++ b/src/internal/poll/fcntl_libc.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 aix || darwin || solaris // +build aix darwin solaris package poll diff --git a/src/internal/poll/fcntl_syscall.go b/src/internal/poll/fcntl_syscall.go index 5ac814359ae..8db5b665049 100644 --- a/src/internal/poll/fcntl_syscall.go +++ b/src/internal/poll/fcntl_syscall.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package poll diff --git a/src/internal/poll/fd_fsync_posix.go b/src/internal/poll/fd_fsync_posix.go index dd7956f14d4..651a5ecd8b2 100644 --- a/src/internal/poll/fd_fsync_posix.go +++ b/src/internal/poll/fd_fsync_posix.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 aix || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris package poll diff --git a/src/internal/poll/fd_poll_js.go b/src/internal/poll/fd_poll_js.go index d6b28e503cd..760e24802e3 100644 --- a/src/internal/poll/fd_poll_js.go +++ b/src/internal/poll/fd_poll_js.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 js && wasm // +build js,wasm package poll diff --git a/src/internal/poll/fd_poll_runtime.go b/src/internal/poll/fd_poll_runtime.go index 222e5c6707a..beb0f7d6a61 100644 --- a/src/internal/poll/fd_poll_runtime.go +++ b/src/internal/poll/fd_poll_runtime.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || windows || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd windows solaris package poll diff --git a/src/internal/poll/fd_posix.go b/src/internal/poll/fd_posix.go index 4edfa953a4b..487f3285ee9 100644 --- a/src/internal/poll/fd_posix.go +++ b/src/internal/poll/fd_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package poll diff --git a/src/internal/poll/fd_posix_test.go b/src/internal/poll/fd_posix_test.go index 4449eb3a15f..1dcf51d4194 100644 --- a/src/internal/poll/fd_posix_test.go +++ b/src/internal/poll/fd_posix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package poll_test diff --git a/src/internal/poll/fd_unix.go b/src/internal/poll/fd_unix.go index 2e77e76c871..fe8a5c8ec00 100644 --- a/src/internal/poll/fd_unix.go +++ b/src/internal/poll/fd_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package poll diff --git a/src/internal/poll/fd_writev_darwin.go b/src/internal/poll/fd_writev_darwin.go index e2024471d4f..805fa2ccd9a 100644 --- a/src/internal/poll/fd_writev_darwin.go +++ b/src/internal/poll/fd_writev_darwin.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 darwin // +build darwin package poll diff --git a/src/internal/poll/fd_writev_illumos.go b/src/internal/poll/fd_writev_illumos.go index 1fa47ab1a32..a0b11ed5ae9 100644 --- a/src/internal/poll/fd_writev_illumos.go +++ b/src/internal/poll/fd_writev_illumos.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 illumos // +build illumos package poll diff --git a/src/internal/poll/fd_writev_unix.go b/src/internal/poll/fd_writev_unix.go index daeec96c385..87f284a56a1 100644 --- a/src/internal/poll/fd_writev_unix.go +++ b/src/internal/poll/fd_writev_unix.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package poll diff --git a/src/internal/poll/hook_cloexec.go b/src/internal/poll/hook_cloexec.go index 5fd5449bb0c..d519f602c1e 100644 --- a/src/internal/poll/hook_cloexec.go +++ b/src/internal/poll/hook_cloexec.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 dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build dragonfly freebsd illumos linux netbsd openbsd package poll diff --git a/src/internal/poll/hook_unix.go b/src/internal/poll/hook_unix.go index 11f90e96968..c88d65cdc83 100644 --- a/src/internal/poll/hook_unix.go +++ b/src/internal/poll/hook_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package poll diff --git a/src/internal/poll/iovec_illumos.go b/src/internal/poll/iovec_illumos.go index 057067465bf..f4058b298f3 100644 --- a/src/internal/poll/iovec_illumos.go +++ b/src/internal/poll/iovec_illumos.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 illumos // +build illumos package poll diff --git a/src/internal/poll/iovec_unix.go b/src/internal/poll/iovec_unix.go index 6f98947866a..6fd5d86630b 100644 --- a/src/internal/poll/iovec_unix.go +++ b/src/internal/poll/iovec_unix.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package poll diff --git a/src/internal/poll/sendfile_bsd.go b/src/internal/poll/sendfile_bsd.go index 66005a9f5c9..9eda85882ca 100644 --- a/src/internal/poll/sendfile_bsd.go +++ b/src/internal/poll/sendfile_bsd.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 dragonfly || freebsd // +build dragonfly freebsd package poll diff --git a/src/internal/poll/sock_cloexec.go b/src/internal/poll/sock_cloexec.go index ff7982ca9e6..52191d85c67 100644 --- a/src/internal/poll/sock_cloexec.go +++ b/src/internal/poll/sock_cloexec.go @@ -5,6 +5,7 @@ // This file implements sysSocket and accept for platforms that // provide a fast path for setting SetNonblock and CloseOnExec. +//go:build dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build dragonfly freebsd illumos linux netbsd openbsd package poll diff --git a/src/internal/poll/sockopt.go b/src/internal/poll/sockopt.go index bb5ea02c0a6..4f2e2fb455d 100644 --- a/src/internal/poll/sockopt.go +++ b/src/internal/poll/sockopt.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package poll diff --git a/src/internal/poll/sockopt_unix.go b/src/internal/poll/sockopt_unix.go index bd942c29345..4fb9600deed 100644 --- a/src/internal/poll/sockopt_unix.go +++ b/src/internal/poll/sockopt_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package poll diff --git a/src/internal/poll/sockoptip.go b/src/internal/poll/sockoptip.go index c55a1e3c5b1..d86c4c1f81a 100644 --- a/src/internal/poll/sockoptip.go +++ b/src/internal/poll/sockoptip.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package poll diff --git a/src/internal/poll/strconv.go b/src/internal/poll/strconv.go index 21cb40db70e..fd5e20f1f40 100644 --- a/src/internal/poll/strconv.go +++ b/src/internal/poll/strconv.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 plan9 // +build plan9 // Simple conversions to avoid depending on strconv. diff --git a/src/internal/poll/sys_cloexec.go b/src/internal/poll/sys_cloexec.go index 4b3c6421731..69207a4b897 100644 --- a/src/internal/poll/sys_cloexec.go +++ b/src/internal/poll/sys_cloexec.go @@ -5,6 +5,7 @@ // This file implements sysSocket and accept for platforms that do not // provide a fast path for setting SetNonblock and CloseOnExec. +//go:build aix || darwin || (js && wasm) || (solaris && !illumos) // +build aix darwin js,wasm solaris,!illumos package poll diff --git a/src/internal/poll/writev.go b/src/internal/poll/writev.go index 0123fc33de7..824de7569e8 100644 --- a/src/internal/poll/writev.go +++ b/src/internal/poll/writev.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 darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build darwin dragonfly freebsd illumos linux netbsd openbsd package poll diff --git a/src/internal/race/norace.go b/src/internal/race/norace.go index d83c0165b22..67b13057131 100644 --- a/src/internal/race/norace.go +++ b/src/internal/race/norace.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 !race // +build !race package race diff --git a/src/internal/race/race.go b/src/internal/race/race.go index 2e7d97beaa2..40f2c99383f 100644 --- a/src/internal/race/race.go +++ b/src/internal/race/race.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 race // +build race package race diff --git a/src/internal/syscall/execenv/execenv_default.go b/src/internal/syscall/execenv/execenv_default.go index 4bdbb55edbf..73289f1cd05 100644 --- a/src/internal/syscall/execenv/execenv_default.go +++ b/src/internal/syscall/execenv/execenv_default.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 execenv diff --git a/src/internal/syscall/execenv/execenv_windows.go b/src/internal/syscall/execenv/execenv_windows.go index b50029c1983..6c0654943e6 100644 --- a/src/internal/syscall/execenv/execenv_windows.go +++ b/src/internal/syscall/execenv/execenv_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 execenv diff --git a/src/internal/syscall/unix/at.go b/src/internal/syscall/unix/at.go index f857d682800..9b08864f7f5 100644 --- a/src/internal/syscall/unix/at.go +++ b/src/internal/syscall/unix/at.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 linux || openbsd || netbsd || dragonfly // +build linux openbsd netbsd dragonfly package unix diff --git a/src/internal/syscall/unix/at_libc.go b/src/internal/syscall/unix/at_libc.go index 6c3a8c91603..4cc351ea278 100644 --- a/src/internal/syscall/unix/at_libc.go +++ b/src/internal/syscall/unix/at_libc.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 aix || solaris // +build aix solaris package unix diff --git a/src/internal/syscall/unix/at_sysnum_fstatat64_linux.go b/src/internal/syscall/unix/at_sysnum_fstatat64_linux.go index c6ea206c121..050d401bc0e 100644 --- a/src/internal/syscall/unix/at_sysnum_fstatat64_linux.go +++ b/src/internal/syscall/unix/at_sysnum_fstatat64_linux.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 arm || mips || mipsle || 386 // +build arm mips mipsle 386 package unix diff --git a/src/internal/syscall/unix/at_sysnum_fstatat_linux.go b/src/internal/syscall/unix/at_sysnum_fstatat_linux.go index 31fe6a5a7b5..e53a2d1b75f 100644 --- a/src/internal/syscall/unix/at_sysnum_fstatat_linux.go +++ b/src/internal/syscall/unix/at_sysnum_fstatat_linux.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 arm64 || riscv64 // +build arm64 riscv64 package unix diff --git a/src/internal/syscall/unix/at_sysnum_newfstatat_linux.go b/src/internal/syscall/unix/at_sysnum_newfstatat_linux.go index e76c1cbdceb..4cb4a5976ba 100644 --- a/src/internal/syscall/unix/at_sysnum_newfstatat_linux.go +++ b/src/internal/syscall/unix/at_sysnum_newfstatat_linux.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 amd64 || mips64 || mips64le || ppc64 || ppc64le || s390x // +build amd64 mips64 mips64le ppc64 ppc64le s390x package unix diff --git a/src/internal/syscall/unix/fcntl_linux_32bit.go b/src/internal/syscall/unix/fcntl_linux_32bit.go index 6c75afc2abe..46a4f6b030d 100644 --- a/src/internal/syscall/unix/fcntl_linux_32bit.go +++ b/src/internal/syscall/unix/fcntl_linux_32bit.go @@ -5,6 +5,7 @@ // On 32-bit Linux systems, use SYS_FCNTL64. // If you change the build tags here, see syscall/flock_linux_32bit.go. +//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) // +build linux,386 linux,arm linux,mips linux,mipsle package unix diff --git a/src/internal/syscall/unix/nonblocking.go b/src/internal/syscall/unix/nonblocking.go index db25fcca985..a22986cb8a4 100644 --- a/src/internal/syscall/unix/nonblocking.go +++ b/src/internal/syscall/unix/nonblocking.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package unix diff --git a/src/internal/syscall/unix/nonblocking_js.go b/src/internal/syscall/unix/nonblocking_js.go index a360b53c3db..a5a5080d461 100644 --- a/src/internal/syscall/unix/nonblocking_js.go +++ b/src/internal/syscall/unix/nonblocking_js.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 js && wasm // +build js,wasm package unix diff --git a/src/internal/syscall/unix/nonblocking_libc.go b/src/internal/syscall/unix/nonblocking_libc.go index 37cc7943eed..d9565efcb6a 100644 --- a/src/internal/syscall/unix/nonblocking_libc.go +++ b/src/internal/syscall/unix/nonblocking_libc.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 aix || darwin || solaris // +build aix darwin solaris package unix diff --git a/src/internal/syscall/unix/pipe2_illumos.go b/src/internal/syscall/unix/pipe2_illumos.go index f3ac8d29df1..b0aac895808 100644 --- a/src/internal/syscall/unix/pipe2_illumos.go +++ b/src/internal/syscall/unix/pipe2_illumos.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 illumos // +build illumos package unix diff --git a/src/internal/syscall/unix/sysnum_linux_generic.go b/src/internal/syscall/unix/sysnum_linux_generic.go index f48da40188e..a76025454ca 100644 --- a/src/internal/syscall/unix/sysnum_linux_generic.go +++ b/src/internal/syscall/unix/sysnum_linux_generic.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 linux && (arm64 || riscv64) // +build linux // +build arm64 riscv64 diff --git a/src/internal/syscall/unix/sysnum_linux_mips64x.go b/src/internal/syscall/unix/sysnum_linux_mips64x.go index 6680942cb8b..f353d4d73e4 100644 --- a/src/internal/syscall/unix/sysnum_linux_mips64x.go +++ b/src/internal/syscall/unix/sysnum_linux_mips64x.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 mips64 || mips64le // +build mips64 mips64le package unix diff --git a/src/internal/syscall/unix/sysnum_linux_mipsx.go b/src/internal/syscall/unix/sysnum_linux_mipsx.go index 185d8320c9e..4ed471532a2 100644 --- a/src/internal/syscall/unix/sysnum_linux_mipsx.go +++ b/src/internal/syscall/unix/sysnum_linux_mipsx.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 mips || mipsle // +build mips mipsle package unix diff --git a/src/internal/syscall/unix/sysnum_linux_ppc64x.go b/src/internal/syscall/unix/sysnum_linux_ppc64x.go index 576937e3f5c..b484ffef80b 100644 --- a/src/internal/syscall/unix/sysnum_linux_ppc64x.go +++ b/src/internal/syscall/unix/sysnum_linux_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package unix diff --git a/src/internal/syscall/unix/writev_illumos.go b/src/internal/syscall/unix/writev_illumos.go index eb7973d65b4..f60949f662b 100644 --- a/src/internal/syscall/unix/writev_illumos.go +++ b/src/internal/syscall/unix/writev_illumos.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 illumos // +build illumos package unix diff --git a/src/internal/testenv/testenv_cgo.go b/src/internal/testenv/testenv_cgo.go index e3d4d16b33e..02f08f57c71 100644 --- a/src/internal/testenv/testenv_cgo.go +++ b/src/internal/testenv/testenv_cgo.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 cgo // +build cgo package testenv diff --git a/src/internal/testenv/testenv_notwin.go b/src/internal/testenv/testenv_notwin.go index ccb5d5585f6..846ec938564 100644 --- a/src/internal/testenv/testenv_notwin.go +++ b/src/internal/testenv/testenv_notwin.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 testenv diff --git a/src/log/syslog/example_test.go b/src/log/syslog/example_test.go index 4288d37dee0..993976569e2 100644 --- a/src/log/syslog/example_test.go +++ b/src/log/syslog/example_test.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 && !plan9 // +build !windows,!plan9 package syslog_test diff --git a/src/log/syslog/syslog.go b/src/log/syslog/syslog.go index 97c10f31df3..6abd4ad1248 100644 --- a/src/log/syslog/syslog.go +++ b/src/log/syslog/syslog.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 && !plan9 // +build !windows,!plan9 package syslog diff --git a/src/log/syslog/syslog_test.go b/src/log/syslog/syslog_test.go index 207bcf57c17..62c62508452 100644 --- a/src/log/syslog/syslog_test.go +++ b/src/log/syslog/syslog_test.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 && !plan9 && !js // +build !windows,!plan9,!js package syslog diff --git a/src/log/syslog/syslog_unix.go b/src/log/syslog/syslog_unix.go index a64eed29f17..2e45f0764fd 100644 --- a/src/log/syslog/syslog_unix.go +++ b/src/log/syslog/syslog_unix.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 && !plan9 // +build !windows,!plan9 package syslog diff --git a/src/math/big/arith_amd64.go b/src/math/big/arith_amd64.go index 1d2d37cf931..89108fe1492 100644 --- a/src/math/big/arith_amd64.go +++ b/src/math/big/arith_amd64.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 !math_big_pure_go // +build !math_big_pure_go package big diff --git a/src/math/big/arith_decl.go b/src/math/big/arith_decl.go index d519bdc87b6..eea3d6b3256 100644 --- a/src/math/big/arith_decl.go +++ b/src/math/big/arith_decl.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 !math_big_pure_go // +build !math_big_pure_go package big diff --git a/src/math/big/arith_decl_pure.go b/src/math/big/arith_decl_pure.go index 5faa3bd2819..059f6f1325f 100644 --- a/src/math/big/arith_decl_pure.go +++ b/src/math/big/arith_decl_pure.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 math_big_pure_go // +build math_big_pure_go package big diff --git a/src/math/big/arith_decl_s390x.go b/src/math/big/arith_decl_s390x.go index f1a69e1df08..4193f3231cb 100644 --- a/src/math/big/arith_decl_s390x.go +++ b/src/math/big/arith_decl_s390x.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 !math_big_pure_go // +build !math_big_pure_go package big diff --git a/src/math/big/arith_s390x_test.go b/src/math/big/arith_s390x_test.go index ce6bca88859..8375ddbdd4c 100644 --- a/src/math/big/arith_s390x_test.go +++ b/src/math/big/arith_s390x_test.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 s390x && !math_big_pure_go // +build s390x,!math_big_pure_go package big diff --git a/src/math/bits/bits_errors.go b/src/math/bits/bits_errors.go index 192b4bee00f..61cb5c94570 100644 --- a/src/math/bits/bits_errors.go +++ b/src/math/bits/bits_errors.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 !compiler_bootstrap // +build !compiler_bootstrap package bits diff --git a/src/math/bits/bits_errors_bootstrap.go b/src/math/bits/bits_errors_bootstrap.go index 5df5738848a..4d610d33b8b 100644 --- a/src/math/bits/bits_errors_bootstrap.go +++ b/src/math/bits/bits_errors_bootstrap.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 compiler_bootstrap // +build compiler_bootstrap // This version used only for bootstrap (on this path we want diff --git a/src/math/bits/make_examples.go b/src/math/bits/make_examples.go index 1d3ad53fe67..ac4004df414 100644 --- a/src/math/bits/make_examples.go +++ b/src/math/bits/make_examples.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 ignore // +build ignore // This program generates example_test.go. diff --git a/src/math/bits/make_tables.go b/src/math/bits/make_tables.go index b068d5e0e39..5ab0b5fc57b 100644 --- a/src/math/bits/make_tables.go +++ b/src/math/bits/make_tables.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 ignore // +build ignore // This program generates bits_tables.go. diff --git a/src/math/cmplx/huge_test.go b/src/math/cmplx/huge_test.go index f8e60c265f6..78b42316de5 100644 --- a/src/math/cmplx/huge_test.go +++ b/src/math/cmplx/huge_test.go @@ -5,6 +5,7 @@ // Disabled for s390x because it uses assembly routines that are not // accurate for huge arguments. +//go:build !s390x // +build !s390x package cmplx diff --git a/src/math/exp_asm.go b/src/math/exp_asm.go index 8dad3c810b6..654ccce4810 100644 --- a/src/math/exp_asm.go +++ b/src/math/exp_asm.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 amd64 // +build amd64 package math diff --git a/src/math/huge_test.go b/src/math/huge_test.go index 9448edc3394..ec81a4a31da 100644 --- a/src/math/huge_test.go +++ b/src/math/huge_test.go @@ -5,6 +5,7 @@ // Disabled for s390x because it uses assembly routines that are not // accurate for huge arguments. +//go:build !s390x // +build !s390x package math_test diff --git a/src/math/rand/gen_cooked.go b/src/math/rand/gen_cooked.go index 0afc10d727e..7950e09fd7c 100644 --- a/src/math/rand/gen_cooked.go +++ b/src/math/rand/gen_cooked.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 ignore // +build ignore // This program computes the value of rngCooked in rng.go, diff --git a/src/mime/type_unix.go b/src/mime/type_unix.go index 3a250028421..851d5a0fb02 100644 --- a/src/mime/type_unix.go +++ b/src/mime/type_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package mime diff --git a/src/net/addrselect.go b/src/net/addrselect.go index 7c0dfe261c4..ae93c595afa 100644 --- a/src/net/addrselect.go +++ b/src/net/addrselect.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // Minimal RFC 6724 address selection. diff --git a/src/net/addrselect_test.go b/src/net/addrselect_test.go index d6e0e63c3b5..dc13917018b 100644 --- a/src/net/addrselect_test.go +++ b/src/net/addrselect_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/cgo_aix.go b/src/net/cgo_aix.go index d0ad414a32b..a94405ecc04 100644 --- a/src/net/cgo_aix.go +++ b/src/net/cgo_aix.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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/cgo_android.go b/src/net/cgo_android.go index ab0368d14b5..4b1a2e3e1d4 100644 --- a/src/net/cgo_android.go +++ b/src/net/cgo_android.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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/cgo_bsd.go b/src/net/cgo_bsd.go index a923c556d31..23be72140b6 100644 --- a/src/net/cgo_bsd.go +++ b/src/net/cgo_bsd.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (darwin || dragonfly || freebsd) +// +build cgo +// +build !netgo // +build darwin dragonfly freebsd package net diff --git a/src/net/cgo_linux.go b/src/net/cgo_linux.go index 86d8f4dc1e5..1bd6be93f78 100644 --- a/src/net/cgo_linux.go +++ b/src/net/cgo_linux.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 !android && cgo && !netgo // +build !android,cgo,!netgo package net diff --git a/src/net/cgo_netbsd.go b/src/net/cgo_netbsd.go index 4610246561e..3714793a52f 100644 --- a/src/net/cgo_netbsd.go +++ b/src/net/cgo_netbsd.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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/cgo_openbsd.go b/src/net/cgo_openbsd.go index 4610246561e..3714793a52f 100644 --- a/src/net/cgo_openbsd.go +++ b/src/net/cgo_openbsd.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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/cgo_resnew.go b/src/net/cgo_resnew.go index 3e3e77e17d3..154405270f1 100644 --- a/src/net/cgo_resnew.go +++ b/src/net/cgo_resnew.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (darwin || (linux && !android) || netbsd || solaris) +// +build cgo +// +build !netgo // +build darwin linux,!android netbsd solaris package net diff --git a/src/net/cgo_resold.go b/src/net/cgo_resold.go index abd04a814d4..c4aab33eaa0 100644 --- a/src/net/cgo_resold.go +++ b/src/net/cgo_resold.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (android || freebsd || dragonfly || openbsd) +// +build cgo +// +build !netgo // +build android freebsd dragonfly openbsd package net diff --git a/src/net/cgo_socknew.go b/src/net/cgo_socknew.go index 3b13926107a..f9cfad9909c 100644 --- a/src/net/cgo_socknew.go +++ b/src/net/cgo_socknew.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (android || linux || solaris) +// +build cgo +// +build !netgo // +build android linux solaris package net diff --git a/src/net/cgo_sockold.go b/src/net/cgo_sockold.go index e1e642bb41b..22c67252f55 100644 --- a/src/net/cgo_sockold.go +++ b/src/net/cgo_sockold.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (aix || darwin || dragonfly || freebsd || netbsd || openbsd) +// +build cgo +// +build !netgo // +build aix darwin dragonfly freebsd netbsd openbsd package net diff --git a/src/net/cgo_solaris.go b/src/net/cgo_solaris.go index 25c0721242f..a84f5b0d34c 100644 --- a/src/net/cgo_solaris.go +++ b/src/net/cgo_solaris.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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/cgo_stub.go b/src/net/cgo_stub.go index 041f8af1296..039e4be88b9 100644 --- a/src/net/cgo_stub.go +++ b/src/net/cgo_stub.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 !cgo || netgo // +build !cgo netgo package net diff --git a/src/net/cgo_unix.go b/src/net/cgo_unix.go index 69c99fe7dbb..2ea86e074fb 100644 --- a/src/net/cgo_unix.go +++ b/src/net/cgo_unix.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) +// +build cgo +// +build !netgo // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/cgo_unix_test.go b/src/net/cgo_unix_test.go index 99d79a60c46..1f3d9ea207a 100644 --- a/src/net/cgo_unix_test.go +++ b/src/net/cgo_unix_test.go @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build cgo,!netgo +//go:build cgo && !netgo && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) +// +build cgo +// +build !netgo // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/cgo_windows.go b/src/net/cgo_windows.go index 8968b757a90..1fd1f29787c 100644 --- a/src/net/cgo_windows.go +++ b/src/net/cgo_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 cgo && !netgo // +build cgo,!netgo package net diff --git a/src/net/conf.go b/src/net/conf.go index f1bbfedad06..6b9569cd92f 100644 --- a/src/net/conf.go +++ b/src/net/conf.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/conf_netcgo.go b/src/net/conf_netcgo.go index db4c703b067..8f387ebc03e 100644 --- a/src/net/conf_netcgo.go +++ b/src/net/conf_netcgo.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 netcgo // +build netcgo package net diff --git a/src/net/conf_test.go b/src/net/conf_test.go index 1fe3cf41b1e..b1f2c55ea50 100644 --- a/src/net/conf_test.go +++ b/src/net/conf_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/conn_test.go b/src/net/conn_test.go index 771cabcd3cd..45e271c2642 100644 --- a/src/net/conn_test.go +++ b/src/net/conn_test.go @@ -5,6 +5,7 @@ // This file implements API tests across platforms and will never have a build // tag. +//go:build !js // +build !js package net diff --git a/src/net/dial_test.go b/src/net/dial_test.go index 57cf5554ad2..394bdb047e7 100644 --- a/src/net/dial_test.go +++ b/src/net/dial_test.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 !js // +build !js package net diff --git a/src/net/dial_unix_test.go b/src/net/dial_unix_test.go index 3cfc9d81b8e..108b9730997 100644 --- a/src/net/dial_unix_test.go +++ b/src/net/dial_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go index d7db0c8133e..a3242ff3b2b 100644 --- a/src/net/dnsclient_unix.go +++ b/src/net/dnsclient_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // DNS client: see RFC 1035. diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go index 0530c92c2e8..b47b83af15c 100644 --- a/src/net/dnsclient_unix_test.go +++ b/src/net/dnsclient_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go index 877e77c0493..db9213a13fd 100644 --- a/src/net/dnsconfig_unix.go +++ b/src/net/dnsconfig_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // Read system DNS config from /etc/resolv.conf diff --git a/src/net/dnsconfig_unix_test.go b/src/net/dnsconfig_unix_test.go index 0d7897a813c..0e2317c4691 100644 --- a/src/net/dnsconfig_unix_test.go +++ b/src/net/dnsconfig_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/dnsname_test.go b/src/net/dnsname_test.go index 2964982311c..d851bf75667 100644 --- a/src/net/dnsname_test.go +++ b/src/net/dnsname_test.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 !js // +build !js package net diff --git a/src/net/error_posix.go b/src/net/error_posix.go index d709a273b73..50eb66fc617 100644 --- a/src/net/error_posix.go +++ b/src/net/error_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/error_posix_test.go b/src/net/error_posix_test.go index b411a378dfc..ea52a45ee89 100644 --- a/src/net/error_posix_test.go +++ b/src/net/error_posix_test.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 !plan9 // +build !plan9 package net diff --git a/src/net/error_test.go b/src/net/error_test.go index 556eb8c8d47..c304390819a 100644 --- a/src/net/error_test.go +++ b/src/net/error_test.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 !js // +build !js package net diff --git a/src/net/error_unix.go b/src/net/error_unix.go index e6153303882..d0b5e2ce969 100644 --- a/src/net/error_unix.go +++ b/src/net/error_unix.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 aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js linux netbsd openbsd solaris package net diff --git a/src/net/error_unix_test.go b/src/net/error_unix_test.go index 9ce9e12c5ec..533a45e648f 100644 --- a/src/net/error_unix_test.go +++ b/src/net/error_unix_test.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 !plan9 && !windows // +build !plan9,!windows package net diff --git a/src/net/external_test.go b/src/net/external_test.go index f3c69c407f7..b8753cc092b 100644 --- a/src/net/external_test.go +++ b/src/net/external_test.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 !js // +build !js package net diff --git a/src/net/fd_posix.go b/src/net/fd_posix.go index 53abd152c7c..2945e46a489 100644 --- a/src/net/fd_posix.go +++ b/src/net/fd_posix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/fd_unix.go b/src/net/fd_unix.go index 1c9bba3b197..a7bbdd26b45 100644 --- a/src/net/fd_unix.go +++ b/src/net/fd_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/file_stub.go b/src/net/file_stub.go index bfb8100f53c..9f988fe8993 100644 --- a/src/net/file_stub.go +++ b/src/net/file_stub.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 js && wasm // +build js,wasm package net diff --git a/src/net/file_test.go b/src/net/file_test.go index 8c09c0da1bd..a70ef1b312f 100644 --- a/src/net/file_test.go +++ b/src/net/file_test.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 !js // +build !js package net diff --git a/src/net/file_unix.go b/src/net/file_unix.go index dba69554ca7..4520d4b839e 100644 --- a/src/net/file_unix.go +++ b/src/net/file_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/hook_unix.go b/src/net/hook_unix.go index a28f1e066da..b9153d1947f 100644 --- a/src/net/hook_unix.go +++ b/src/net/hook_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package net diff --git a/src/net/http/cgi/plan9_test.go b/src/net/http/cgi/plan9_test.go index cc20fe03e4e..f998bac6ea6 100644 --- a/src/net/http/cgi/plan9_test.go +++ b/src/net/http/cgi/plan9_test.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 plan9 // +build plan9 package cgi diff --git a/src/net/http/cgi/posix_test.go b/src/net/http/cgi/posix_test.go index 9396ce036af..bc58ea94cc9 100644 --- a/src/net/http/cgi/posix_test.go +++ b/src/net/http/cgi/posix_test.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 !plan9 // +build !plan9 package cgi diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go index 6bef310febf..0379848e708 100644 --- a/src/net/http/h2_bundle.go +++ b/src/net/http/h2_bundle.go @@ -1,3 +1,4 @@ +//go:build !nethttpomithttp2 // +build !nethttpomithttp2 // Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT. diff --git a/src/net/http/omithttp2.go b/src/net/http/omithttp2.go index 30c6e48cfcb..79599d006aa 100644 --- a/src/net/http/omithttp2.go +++ b/src/net/http/omithttp2.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 nethttpomithttp2 // +build nethttpomithttp2 package http diff --git a/src/net/http/roundtrip.go b/src/net/http/roundtrip.go index 2ec736bfb19..eef7c79293e 100644 --- a/src/net/http/roundtrip.go +++ b/src/net/http/roundtrip.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 !js || !wasm // +build !js !wasm package http diff --git a/src/net/http/roundtrip_js.go b/src/net/http/roundtrip_js.go index c6a221ac628..74c83a9172c 100644 --- a/src/net/http/roundtrip_js.go +++ b/src/net/http/roundtrip_js.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 js && wasm // +build js,wasm package http diff --git a/src/net/http/triv.go b/src/net/http/triv.go index 23e65d56e86..4dc62407c6d 100644 --- a/src/net/http/triv.go +++ b/src/net/http/triv.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 ignore // +build ignore package main diff --git a/src/net/interface_bsd.go b/src/net/interface_bsd.go index d791cb30167..7578b1a16a9 100644 --- a/src/net/interface_bsd.go +++ b/src/net/interface_bsd.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package net diff --git a/src/net/interface_bsd_test.go b/src/net/interface_bsd_test.go index 947dde71e61..8d0d9c36719 100644 --- a/src/net/interface_bsd_test.go +++ b/src/net/interface_bsd_test.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package net diff --git a/src/net/interface_bsdvar.go b/src/net/interface_bsdvar.go index a809b5f5ce4..6230e0bfeec 100644 --- a/src/net/interface_bsdvar.go +++ b/src/net/interface_bsdvar.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 dragonfly || netbsd || openbsd // +build dragonfly netbsd openbsd package net diff --git a/src/net/interface_stub.go b/src/net/interface_stub.go index ec58665e195..efe67c24d3c 100644 --- a/src/net/interface_stub.go +++ b/src/net/interface_stub.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 js && wasm // +build js,wasm package net diff --git a/src/net/interface_test.go b/src/net/interface_test.go index b2ef21e8ac2..754db36e3c4 100644 --- a/src/net/interface_test.go +++ b/src/net/interface_test.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 !js // +build !js package net diff --git a/src/net/interface_unix_test.go b/src/net/interface_unix_test.go index bf41a0fb82d..0d69fa5da41 100644 --- a/src/net/interface_unix_test.go +++ b/src/net/interface_unix_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package net diff --git a/src/net/internal/socktest/main_test.go b/src/net/internal/socktest/main_test.go index 3b0a48aef4d..8af85d382eb 100644 --- a/src/net/internal/socktest/main_test.go +++ b/src/net/internal/socktest/main_test.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 !js && !plan9 // +build !js,!plan9 package socktest_test diff --git a/src/net/internal/socktest/main_unix_test.go b/src/net/internal/socktest/main_unix_test.go index 4d9d4143564..6aa8875b66c 100644 --- a/src/net/internal/socktest/main_unix_test.go +++ b/src/net/internal/socktest/main_unix_test.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 !js && !plan9 && !windows // +build !js,!plan9,!windows package socktest_test diff --git a/src/net/internal/socktest/switch_posix.go b/src/net/internal/socktest/switch_posix.go index 863edef0d35..cda74e86399 100644 --- a/src/net/internal/socktest/switch_posix.go +++ b/src/net/internal/socktest/switch_posix.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 !plan9 // +build !plan9 package socktest diff --git a/src/net/internal/socktest/switch_stub.go b/src/net/internal/socktest/switch_stub.go index 28ce72cb855..5aa2ecec08f 100644 --- a/src/net/internal/socktest/switch_stub.go +++ b/src/net/internal/socktest/switch_stub.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 plan9 // +build plan9 package socktest diff --git a/src/net/internal/socktest/switch_unix.go b/src/net/internal/socktest/switch_unix.go index 7dc35184105..bfe9d4dbd36 100644 --- a/src/net/internal/socktest/switch_unix.go +++ b/src/net/internal/socktest/switch_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package socktest diff --git a/src/net/internal/socktest/sys_cloexec.go b/src/net/internal/socktest/sys_cloexec.go index 421352c7b47..c7f8331c2e5 100644 --- a/src/net/internal/socktest/sys_cloexec.go +++ b/src/net/internal/socktest/sys_cloexec.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 dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build dragonfly freebsd illumos linux netbsd openbsd package socktest diff --git a/src/net/internal/socktest/sys_unix.go b/src/net/internal/socktest/sys_unix.go index 0525512bff9..e7cc45922e0 100644 --- a/src/net/internal/socktest/sys_unix.go +++ b/src/net/internal/socktest/sys_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package socktest diff --git a/src/net/ip_test.go b/src/net/ip_test.go index a5fc5e644a2..1e09ae9db44 100644 --- a/src/net/ip_test.go +++ b/src/net/ip_test.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 !js // +build !js package net diff --git a/src/net/iprawsock_posix.go b/src/net/iprawsock_posix.go index e653f6ae17b..c1514f1698c 100644 --- a/src/net/iprawsock_posix.go +++ b/src/net/iprawsock_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/iprawsock_test.go b/src/net/iprawsock_test.go index 8e3543dfc7f..a96448ee6c6 100644 --- a/src/net/iprawsock_test.go +++ b/src/net/iprawsock_test.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 !js // +build !js package net diff --git a/src/net/ipsock_posix.go b/src/net/ipsock_posix.go index 8763d579fb1..8d8a896501c 100644 --- a/src/net/ipsock_posix.go +++ b/src/net/ipsock_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/listen_test.go b/src/net/listen_test.go index d8c72096ed1..b1dce29ac20 100644 --- a/src/net/listen_test.go +++ b/src/net/listen_test.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 !js && !plan9 // +build !js,!plan9 package net diff --git a/src/net/lookup_fake.go b/src/net/lookup_fake.go index 3b3c39bc7da..f4fcaed5cfa 100644 --- a/src/net/lookup_fake.go +++ b/src/net/lookup_fake.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 js && wasm // +build js,wasm package net diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index 32a0d377da3..3faaf007106 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.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 !js // +build !js package net diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go index 9055826d405..c09afb300f5 100644 --- a/src/net/lookup_unix.go +++ b/src/net/lookup_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/main_cloexec_test.go b/src/net/main_cloexec_test.go index 46b9ba5008a..742be2fcd81 100644 --- a/src/net/main_cloexec_test.go +++ b/src/net/main_cloexec_test.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 dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build dragonfly freebsd illumos linux netbsd openbsd package net diff --git a/src/net/main_conf_test.go b/src/net/main_conf_test.go index a92dff56c2a..645b267b780 100644 --- a/src/net/main_conf_test.go +++ b/src/net/main_conf_test.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 !js && !plan9 && !windows // +build !js,!plan9,!windows package net diff --git a/src/net/main_noconf_test.go b/src/net/main_noconf_test.go index bac84aa3002..bcea630cd3c 100644 --- a/src/net/main_noconf_test.go +++ b/src/net/main_noconf_test.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 (js && wasm) || plan9 || windows // +build js,wasm plan9 windows package net diff --git a/src/net/main_posix_test.go b/src/net/main_posix_test.go index f2484f306db..c9ab25a4ad5 100644 --- a/src/net/main_posix_test.go +++ b/src/net/main_posix_test.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 !js && !plan9 // +build !js,!plan9 package net diff --git a/src/net/main_test.go b/src/net/main_test.go index 2d5be2ee5f8..dc17d3fbb84 100644 --- a/src/net/main_test.go +++ b/src/net/main_test.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 !js // +build !js package net diff --git a/src/net/main_unix_test.go b/src/net/main_unix_test.go index 8b9897699c5..c8cff2d305a 100644 --- a/src/net/main_unix_test.go +++ b/src/net/main_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/mockserver_test.go b/src/net/mockserver_test.go index 867e31e9ae6..b50a1e59a1a 100644 --- a/src/net/mockserver_test.go +++ b/src/net/mockserver_test.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 !js // +build !js package net diff --git a/src/net/net_fake.go b/src/net/net_fake.go index 0c48dd5c03b..49dc57c6ffe 100644 --- a/src/net/net_fake.go +++ b/src/net/net_fake.go @@ -4,6 +4,7 @@ // Fake networking for js/wasm. It is intended to allow tests of other package to pass. +//go:build js && wasm // +build js,wasm package net diff --git a/src/net/net_test.go b/src/net/net_test.go index 409e1400af9..6d6299e74ad 100644 --- a/src/net/net_test.go +++ b/src/net/net_test.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 !js // +build !js package net diff --git a/src/net/netgo_unix_test.go b/src/net/netgo_unix_test.go index c672d3e8ebf..0dfd6c2cd7f 100644 --- a/src/net/netgo_unix_test.go +++ b/src/net/netgo_unix_test.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 (!cgo || netgo) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) // +build !cgo netgo // +build darwin dragonfly freebsd linux netbsd openbsd solaris diff --git a/src/net/nss.go b/src/net/nss.go index 96b9cdd1210..85177cab9b9 100644 --- a/src/net/nss.go +++ b/src/net/nss.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/nss_test.go b/src/net/nss_test.go index 371deb502d1..4b73886c511 100644 --- a/src/net/nss_test.go +++ b/src/net/nss_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/packetconn_test.go b/src/net/packetconn_test.go index a377d333d6a..aeb9845fa77 100644 --- a/src/net/packetconn_test.go +++ b/src/net/packetconn_test.go @@ -5,6 +5,7 @@ // This file implements API tests across platforms and will never have a build // tag. +//go:build !js // +build !js package net diff --git a/src/net/port_unix.go b/src/net/port_unix.go index 4fdd9a37bc6..a9a96a2323b 100644 --- a/src/net/port_unix.go +++ b/src/net/port_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris // Read system port mappings from /etc/services diff --git a/src/net/protoconn_test.go b/src/net/protoconn_test.go index 6f83f526812..fc9b3862563 100644 --- a/src/net/protoconn_test.go +++ b/src/net/protoconn_test.go @@ -5,6 +5,7 @@ // This file implements API tests across platforms and will never have a build // tag. +//go:build !js // +build !js package net diff --git a/src/net/rawconn_stub_test.go b/src/net/rawconn_stub_test.go index cec977f75d9..975aa8d9569 100644 --- a/src/net/rawconn_stub_test.go +++ b/src/net/rawconn_stub_test.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 (js && wasm) || plan9 // +build js,wasm plan9 package net diff --git a/src/net/rawconn_test.go b/src/net/rawconn_test.go index a08ff89d1af..3ef7af33b73 100644 --- a/src/net/rawconn_test.go +++ b/src/net/rawconn_test.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 !js // +build !js package net diff --git a/src/net/rawconn_unix_test.go b/src/net/rawconn_unix_test.go index 0194ba67c8e..75bbab8b27e 100644 --- a/src/net/rawconn_unix_test.go +++ b/src/net/rawconn_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/sendfile_stub.go b/src/net/sendfile_stub.go index 53bc53af43b..5753bc02898 100644 --- a/src/net/sendfile_stub.go +++ b/src/net/sendfile_stub.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 aix || darwin || (js && wasm) || netbsd || openbsd // +build aix darwin js,wasm netbsd openbsd package net diff --git a/src/net/sendfile_test.go b/src/net/sendfile_test.go index d6057fd8391..db72daa3286 100644 --- a/src/net/sendfile_test.go +++ b/src/net/sendfile_test.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 !js // +build !js package net diff --git a/src/net/sendfile_unix_alt.go b/src/net/sendfile_unix_alt.go index 8cededce58d..54667d672f8 100644 --- a/src/net/sendfile_unix_alt.go +++ b/src/net/sendfile_unix_alt.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 dragonfly || freebsd || solaris // +build dragonfly freebsd solaris package net diff --git a/src/net/server_test.go b/src/net/server_test.go index 4ac5443e6a1..8d4db7233d1 100644 --- a/src/net/server_test.go +++ b/src/net/server_test.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 !js // +build !js package net diff --git a/src/net/sock_bsd.go b/src/net/sock_bsd.go index 73fb6be814e..4c883ada78f 100644 --- a/src/net/sock_bsd.go +++ b/src/net/sock_bsd.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package net diff --git a/src/net/sock_cloexec.go b/src/net/sock_cloexec.go index 5f345f0f4a5..efc91fdb530 100644 --- a/src/net/sock_cloexec.go +++ b/src/net/sock_cloexec.go @@ -5,6 +5,7 @@ // This file implements sysSocket and accept for platforms that // provide a fast path for setting SetNonblock and CloseOnExec. +//go:build dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build dragonfly freebsd illumos linux netbsd openbsd package net diff --git a/src/net/sock_posix.go b/src/net/sock_posix.go index 80b4169ec64..9b1e7880aed 100644 --- a/src/net/sock_posix.go +++ b/src/net/sock_posix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/sock_stub.go b/src/net/sock_stub.go index c9f86af4e7c..d804bfaacce 100644 --- a/src/net/sock_stub.go +++ b/src/net/sock_stub.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 aix || (js && wasm) || solaris // +build aix js,wasm solaris package net diff --git a/src/net/sockaddr_posix.go b/src/net/sockaddr_posix.go index a3710dd3f74..9d77cb569b9 100644 --- a/src/net/sockaddr_posix.go +++ b/src/net/sockaddr_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/sockopt_bsd.go b/src/net/sockopt_bsd.go index 8fd1e882c62..216e5d52f12 100644 --- a/src/net/sockopt_bsd.go +++ b/src/net/sockopt_bsd.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package net diff --git a/src/net/sockopt_posix.go b/src/net/sockopt_posix.go index de7255667f7..50b9bfa0a78 100644 --- a/src/net/sockopt_posix.go +++ b/src/net/sockopt_posix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/sockopt_stub.go b/src/net/sockopt_stub.go index 52624a35d81..99b5277ed0a 100644 --- a/src/net/sockopt_stub.go +++ b/src/net/sockopt_stub.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 js && wasm // +build js,wasm package net diff --git a/src/net/sockoptip_bsdvar.go b/src/net/sockoptip_bsdvar.go index 20a6dc95497..56022fd1a59 100644 --- a/src/net/sockoptip_bsdvar.go +++ b/src/net/sockoptip_bsdvar.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 aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd netbsd openbsd solaris package net diff --git a/src/net/sockoptip_posix.go b/src/net/sockoptip_posix.go index b14963ff32e..a2143aec2cb 100644 --- a/src/net/sockoptip_posix.go +++ b/src/net/sockoptip_posix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/sockoptip_stub.go b/src/net/sockoptip_stub.go index 57cd2890405..4175922cec5 100644 --- a/src/net/sockoptip_stub.go +++ b/src/net/sockoptip_stub.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 js && wasm // +build js,wasm package net diff --git a/src/net/splice_stub.go b/src/net/splice_stub.go index 9106cb2c18c..ce2e9046a94 100644 --- a/src/net/splice_stub.go +++ b/src/net/splice_stub.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 !linux // +build !linux package net diff --git a/src/net/splice_test.go b/src/net/splice_test.go index 8a0cda65644..be13cc924d0 100644 --- a/src/net/splice_test.go +++ b/src/net/splice_test.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 linux // +build linux package net diff --git a/src/net/sys_cloexec.go b/src/net/sys_cloexec.go index 967b8bea9dd..4d7112051ff 100644 --- a/src/net/sys_cloexec.go +++ b/src/net/sys_cloexec.go @@ -5,6 +5,7 @@ // This file implements sysSocket and accept for platforms that do not // provide a fast path for setting SetNonblock and CloseOnExec. +//go:build aix || darwin || (solaris && !illumos) // +build aix darwin solaris,!illumos package net diff --git a/src/net/tcpsock_posix.go b/src/net/tcpsock_posix.go index 257c11976f4..7c4523c5eea 100644 --- a/src/net/tcpsock_posix.go +++ b/src/net/tcpsock_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/tcpsock_test.go b/src/net/tcpsock_test.go index d6172bc5030..9c9f1eae93d 100644 --- a/src/net/tcpsock_test.go +++ b/src/net/tcpsock_test.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 !js // +build !js package net diff --git a/src/net/tcpsock_unix_test.go b/src/net/tcpsock_unix_test.go index 2bd591b5944..41bd229132d 100644 --- a/src/net/tcpsock_unix_test.go +++ b/src/net/tcpsock_unix_test.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 !js && !plan9 && !windows // +build !js,!plan9,!windows package net diff --git a/src/net/tcpsockopt_posix.go b/src/net/tcpsockopt_posix.go index 5e00ba15647..d08832adc04 100644 --- a/src/net/tcpsockopt_posix.go +++ b/src/net/tcpsockopt_posix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/tcpsockopt_stub.go b/src/net/tcpsockopt_stub.go index d043da123d6..028d5fd29cf 100644 --- a/src/net/tcpsockopt_stub.go +++ b/src/net/tcpsockopt_stub.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 js && wasm // +build js,wasm package net diff --git a/src/net/tcpsockopt_unix.go b/src/net/tcpsockopt_unix.go index fb0ecb8dc74..a945889e00e 100644 --- a/src/net/tcpsockopt_unix.go +++ b/src/net/tcpsockopt_unix.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 aix || freebsd || linux || netbsd // +build aix freebsd linux netbsd package net diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go index 205aaa430ba..e1cf1467c36 100644 --- a/src/net/timeout_test.go +++ b/src/net/timeout_test.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 !js // +build !js package net diff --git a/src/net/udpsock_posix.go b/src/net/udpsock_posix.go index bbfa4ed9c73..58c69f18ad5 100644 --- a/src/net/udpsock_posix.go +++ b/src/net/udpsock_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/udpsock_test.go b/src/net/udpsock_test.go index 327eba65412..7a1ed4eb183 100644 --- a/src/net/udpsock_test.go +++ b/src/net/udpsock_test.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 !js // +build !js package net diff --git a/src/net/unixsock_posix.go b/src/net/unixsock_posix.go index 275c7c936d1..1d1f27449f5 100644 --- a/src/net/unixsock_posix.go +++ b/src/net/unixsock_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/unixsock_test.go b/src/net/unixsock_test.go index 0b13bf655f3..71092e88fb6 100644 --- a/src/net/unixsock_test.go +++ b/src/net/unixsock_test.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 !js && !plan9 && !windows // +build !js,!plan9,!windows package net diff --git a/src/net/unixsock_windows_test.go b/src/net/unixsock_windows_test.go index 5dccc146533..29244f64710 100644 --- a/src/net/unixsock_windows_test.go +++ b/src/net/unixsock_windows_test.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 net diff --git a/src/net/write_unix_test.go b/src/net/write_unix_test.go index 6d8cb6a6f81..f79f2d0865d 100644 --- a/src/net/write_unix_test.go +++ b/src/net/write_unix_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/writev_test.go b/src/net/writev_test.go index d603b7f70a6..bf40ca2023a 100644 --- a/src/net/writev_test.go +++ b/src/net/writev_test.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 !js // +build !js package net diff --git a/src/net/writev_unix.go b/src/net/writev_unix.go index 8b20f42b34d..a0fedc2f990 100644 --- a/src/net/writev_unix.go +++ b/src/net/writev_unix.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 darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd // +build darwin dragonfly freebsd illumos linux netbsd openbsd package net diff --git a/src/os/dir_unix.go b/src/os/dir_unix.go index 0e1eab1c965..ef5c00aee08 100644 --- a/src/os/dir_unix.go +++ b/src/os/dir_unix.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 aix || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/endian_big.go b/src/os/endian_big.go index c98f1247822..0529dccd6f2 100644 --- a/src/os/endian_big.go +++ b/src/os/endian_big.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 ppc64 || s390x || mips || mips64 // +build ppc64 s390x mips mips64 package os diff --git a/src/os/endian_little.go b/src/os/endian_little.go index 3efc5e0d8d4..6be6020f534 100644 --- a/src/os/endian_little.go +++ b/src/os/endian_little.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 386 || amd64 || arm || arm64 || ppc64le || mips64le || mipsle || riscv64 || wasm // +build 386 amd64 arm arm64 ppc64le mips64le mipsle riscv64 wasm package os diff --git a/src/os/env_unix_test.go b/src/os/env_unix_test.go index 89430b3e204..d45e1deb833 100644 --- a/src/os/env_unix_test.go +++ b/src/os/env_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package os_test diff --git a/src/os/error_errno.go b/src/os/error_errno.go index 31ae05a21e8..580e915b73c 100644 --- a/src/os/error_errno.go +++ b/src/os/error_errno.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 !plan9 // +build !plan9 package os diff --git a/src/os/error_posix.go b/src/os/error_posix.go index 2aeca823043..268b3a923ab 100644 --- a/src/os/error_posix.go +++ b/src/os/error_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package os diff --git a/src/os/error_unix_test.go b/src/os/error_unix_test.go index 18bcf3f4e44..e45282a0fdb 100644 --- a/src/os/error_unix_test.go +++ b/src/os/error_unix_test.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os_test diff --git a/src/os/error_windows_test.go b/src/os/error_windows_test.go index b8191c5ebc8..aa0c14b7d46 100644 --- a/src/os/error_windows_test.go +++ b/src/os/error_windows_test.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 os_test diff --git a/src/os/exec/exec_linux_test.go b/src/os/exec/exec_linux_test.go index 6f850204d60..3cfa30ee724 100644 --- a/src/os/exec/exec_linux_test.go +++ b/src/os/exec/exec_linux_test.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 linux && cgo // +build linux,cgo // On systems that use glibc, calling malloc can create a new arena, diff --git a/src/os/exec/exec_posix_test.go b/src/os/exec/exec_posix_test.go index d4d67ac9336..7b2c0c0c111 100644 --- a/src/os/exec/exec_posix_test.go +++ b/src/os/exec/exec_posix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package exec_test diff --git a/src/os/exec/exec_unix.go b/src/os/exec/exec_unix.go index 51c52427c2b..467c069e1ca 100644 --- a/src/os/exec/exec_unix.go +++ b/src/os/exec/exec_unix.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 !plan9 && !windows // +build !plan9,!windows package exec diff --git a/src/os/exec/lp_js.go b/src/os/exec/lp_js.go index 6750fb99b0f..4eac25fe6f4 100644 --- a/src/os/exec/lp_js.go +++ b/src/os/exec/lp_js.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 js && wasm // +build js,wasm package exec diff --git a/src/os/exec/lp_unix.go b/src/os/exec/lp_unix.go index 66c1df76fb9..d1d246accf1 100644 --- a/src/os/exec/lp_unix.go +++ b/src/os/exec/lp_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package exec diff --git a/src/os/exec/lp_unix_test.go b/src/os/exec/lp_unix_test.go index 296480fd041..75bcdb1fdd9 100644 --- a/src/os/exec/lp_unix_test.go +++ b/src/os/exec/lp_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package exec diff --git a/src/os/exec/read3.go b/src/os/exec/read3.go index 8cc24da8cb4..a8c71831d88 100644 --- a/src/os/exec/read3.go +++ b/src/os/exec/read3.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 ignore // +build ignore // This is a test program that verifies that it can read from diff --git a/src/os/exec_posix.go b/src/os/exec_posix.go index 8aa1e5e4999..443d4e0218b 100644 --- a/src/os/exec_posix.go +++ b/src/os/exec_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package os diff --git a/src/os/exec_unix.go b/src/os/exec_unix.go index a1703a12594..d1bbeb75298 100644 --- a/src/os/exec_unix.go +++ b/src/os/exec_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/exec_unix_test.go b/src/os/exec_unix_test.go index d942cdb5e53..f14b3519fbe 100644 --- a/src/os/exec_unix_test.go +++ b/src/os/exec_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package os_test diff --git a/src/os/executable_path.go b/src/os/executable_path.go index 7b8b83652c8..625430ecfca 100644 --- a/src/os/executable_path.go +++ b/src/os/executable_path.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 aix || openbsd // +build aix openbsd package os diff --git a/src/os/executable_plan9.go b/src/os/executable_plan9.go index a5947eaae1e..105c03f0c1a 100644 --- a/src/os/executable_plan9.go +++ b/src/os/executable_plan9.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 plan9 // +build plan9 package os diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go index 5ee41a4b2e2..9c64a0d4747 100644 --- a/src/os/executable_procfs.go +++ b/src/os/executable_procfs.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 linux || netbsd || (js && wasm) // +build linux netbsd js,wasm package os diff --git a/src/os/executable_sysctl.go b/src/os/executable_sysctl.go index f9a4b18f609..039448b5573 100644 --- a/src/os/executable_sysctl.go +++ b/src/os/executable_sysctl.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 freebsd || dragonfly // +build freebsd dragonfly package os diff --git a/src/os/export_unix_test.go b/src/os/export_unix_test.go index 39866a68deb..10f83128317 100644 --- a/src/os/export_unix_test.go +++ b/src/os/export_unix_test.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/fifo_test.go b/src/os/fifo_test.go index 2439192a9dd..c3607344ec5 100644 --- a/src/os/fifo_test.go +++ b/src/os/fifo_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package os_test diff --git a/src/os/file_posix.go b/src/os/file_posix.go index 795c547856a..211f2a1798a 100644 --- a/src/os/file_posix.go +++ b/src/os/file_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package os diff --git a/src/os/file_unix.go b/src/os/file_unix.go index f88450018ee..e8b286c9ee8 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/os_unix_test.go b/src/os/os_unix_test.go index 51693fd82a1..9b4c0ab290b 100644 --- a/src/os/os_unix_test.go +++ b/src/os/os_unix_test.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os_test diff --git a/src/os/path_unix.go b/src/os/path_unix.go index c99a8240c53..db383594920 100644 --- a/src/os/path_unix.go +++ b/src/os/path_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/pipe2_bsd.go b/src/os/pipe2_bsd.go index 0ef894b476b..0af80195256 100644 --- a/src/os/pipe2_bsd.go +++ b/src/os/pipe2_bsd.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 freebsd || netbsd || openbsd // +build freebsd netbsd openbsd package os diff --git a/src/os/pipe2_illumos.go b/src/os/pipe2_illumos.go index 026ce62b9a6..71b8cb8e25b 100644 --- a/src/os/pipe2_illumos.go +++ b/src/os/pipe2_illumos.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 illumos // +build illumos package os diff --git a/src/os/pipe_bsd.go b/src/os/pipe_bsd.go index 115d6baa190..57959a2ea43 100644 --- a/src/os/pipe_bsd.go +++ b/src/os/pipe_bsd.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 aix || darwin || dragonfly || (js && wasm) || (solaris && !illumos) // +build aix darwin dragonfly js,wasm solaris,!illumos package os diff --git a/src/os/pipe_test.go b/src/os/pipe_test.go index b98e53845c6..b6636185029 100644 --- a/src/os/pipe_test.go +++ b/src/os/pipe_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // Test broken pipes on Unix systems. +//go:build !plan9 && !js // +build !plan9,!js package os_test diff --git a/src/os/rawconn.go b/src/os/rawconn.go index 9e11cda8c9a..ffc598b0618 100644 --- a/src/os/rawconn.go +++ b/src/os/rawconn.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 !plan9 // +build !plan9 package os diff --git a/src/os/rawconn_test.go b/src/os/rawconn_test.go index 2554f5b0878..8aebaf87a60 100644 --- a/src/os/rawconn_test.go +++ b/src/os/rawconn_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // Test use of raw connections. +//go:build !plan9 && !js // +build !plan9,!js package os_test diff --git a/src/os/readfrom_stub.go b/src/os/readfrom_stub.go index 65429d0cab2..826760f3df6 100644 --- a/src/os/readfrom_stub.go +++ b/src/os/readfrom_stub.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 !linux // +build !linux package os diff --git a/src/os/removeall_at.go b/src/os/removeall_at.go index c1a1b726aff..d04540bc63e 100644 --- a/src/os/removeall_at.go +++ b/src/os/removeall_at.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package os diff --git a/src/os/removeall_noat.go b/src/os/removeall_noat.go index 7c888baaa99..853e0eddfc8 100644 --- a/src/os/removeall_noat.go +++ b/src/os/removeall_noat.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 !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris package os diff --git a/src/os/signal/example_unix_test.go b/src/os/signal/example_unix_test.go index a0af37a5bb3..3f7795b8cf9 100644 --- a/src/os/signal/example_unix_test.go +++ b/src/os/signal/example_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package signal_test diff --git a/src/os/signal/internal/pty/pty.go b/src/os/signal/internal/pty/pty.go index f8813ce6bec..8d2eac71035 100644 --- a/src/os/signal/internal/pty/pty.go +++ b/src/os/signal/internal/pty/pty.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 (aix || darwin || dragonfly || freebsd || (linux && !android) || netbsd || openbsd) && cgo // +build aix darwin dragonfly freebsd linux,!android netbsd openbsd // +build cgo diff --git a/src/os/signal/signal_cgo_test.go b/src/os/signal/signal_cgo_test.go index a8a485613f5..e1e4509e2a7 100644 --- a/src/os/signal/signal_cgo_test.go +++ b/src/os/signal/signal_cgo_test.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 (darwin || dragonfly || freebsd || (linux && !android) || netbsd || openbsd) && cgo // +build darwin dragonfly freebsd linux,!android netbsd openbsd // +build cgo diff --git a/src/os/signal/signal_linux_test.go b/src/os/signal/signal_linux_test.go index 2e553d0b0f0..7abe1ec5a0a 100644 --- a/src/os/signal/signal_linux_test.go +++ b/src/os/signal/signal_linux_test.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 linux // +build linux package signal diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go index bbc68af9fbd..292d24c6f1a 100644 --- a/src/os/signal/signal_test.go +++ b/src/os/signal/signal_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package signal diff --git a/src/os/signal/signal_unix.go b/src/os/signal/signal_unix.go index 90a1eca156f..9e241c43ace 100644 --- a/src/os/signal/signal_unix.go +++ b/src/os/signal/signal_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package signal diff --git a/src/os/stat_js.go b/src/os/stat_js.go index 8d20ccddfcc..3badf5ba575 100644 --- a/src/os/stat_js.go +++ b/src/os/stat_js.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 js && wasm // +build js,wasm package os diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go index 66c356fc620..8c17805f71f 100644 --- a/src/os/stat_unix.go +++ b/src/os/stat_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package os diff --git a/src/os/sticky_bsd.go b/src/os/sticky_bsd.go index c09b1ac2028..ab23d8111d3 100644 --- a/src/os/sticky_bsd.go +++ b/src/os/sticky_bsd.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 aix || darwin || dragonfly || freebsd || (js && wasm) || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm netbsd openbsd solaris package os diff --git a/src/os/sticky_notbsd.go b/src/os/sticky_notbsd.go index c15850692cd..9979b43e8e6 100644 --- a/src/os/sticky_notbsd.go +++ b/src/os/sticky_notbsd.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 !aix && !darwin && !dragonfly && !freebsd && (!js || !wasm) && !netbsd && !openbsd && !solaris // +build !aix // +build !darwin // +build !dragonfly diff --git a/src/os/sys_bsd.go b/src/os/sys_bsd.go index b1698f5d4c7..1e245eb53a2 100644 --- a/src/os/sys_bsd.go +++ b/src/os/sys_bsd.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 darwin || dragonfly || freebsd || (js && wasm) || netbsd || openbsd // +build darwin dragonfly freebsd js,wasm netbsd openbsd package os diff --git a/src/os/sys_js.go b/src/os/sys_js.go index e860654f812..4d6a64e8ebe 100644 --- a/src/os/sys_js.go +++ b/src/os/sys_js.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 js && wasm // +build js,wasm package os diff --git a/src/os/sys_unix.go b/src/os/sys_unix.go index 8491bad2421..e316eaf06c4 100644 --- a/src/os/sys_unix.go +++ b/src/os/sys_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package os diff --git a/src/os/timeout_test.go b/src/os/timeout_test.go index 0a39f463336..6d65e420f04 100644 --- a/src/os/timeout_test.go +++ b/src/os/timeout_test.go @@ -2,9 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js -// +build !plan9 -// +build !windows +//go:build !js && !plan9 && !windows +// +build !js,!plan9,!windows package os_test diff --git a/src/os/types_unix.go b/src/os/types_unix.go index c0259ae0e84..e9b8b8ba3ac 100644 --- a/src/os/types_unix.go +++ b/src/os/types_unix.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !windows -// +build !plan9 +//go:build !windows && !plan9 +// +build !windows,!plan9 package os diff --git a/src/os/user/cgo_lookup_unix.go b/src/os/user/cgo_lookup_unix.go index 3307f790eac..abc9e9ce6d6 100644 --- a/src/os/user/cgo_lookup_unix.go +++ b/src/os/user/cgo_lookup_unix.go @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (aix || darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo // +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris -// +build cgo,!osusergo +// +build cgo +// +build !osusergo package user diff --git a/src/os/user/cgo_unix_test.go b/src/os/user/cgo_unix_test.go index 1d341aa427d..9ec32b3a788 100644 --- a/src/os/user/cgo_unix_test.go +++ b/src/os/user/cgo_unix_test.go @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo // +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris -// +build cgo,!osusergo +// +build cgo +// +build !osusergo package user diff --git a/src/os/user/getgrouplist_darwin.go b/src/os/user/getgrouplist_darwin.go index e8fe26c47fa..23d12e32476 100644 --- a/src/os/user/getgrouplist_darwin.go +++ b/src/os/user/getgrouplist_darwin.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 cgo && !osusergo // +build cgo,!osusergo package user diff --git a/src/os/user/getgrouplist_unix.go b/src/os/user/getgrouplist_unix.go index 9685414fc02..8393c5a474c 100644 --- a/src/os/user/getgrouplist_unix.go +++ b/src/os/user/getgrouplist_unix.go @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (dragonfly || freebsd || (!android && linux) || netbsd || openbsd) && cgo && !osusergo // +build dragonfly freebsd !android,linux netbsd openbsd -// +build cgo,!osusergo +// +build cgo +// +build !osusergo package user diff --git a/src/os/user/listgroups_aix.go b/src/os/user/listgroups_aix.go index 17de3e98d49..d2fdfdc6b1e 100644 --- a/src/os/user/listgroups_aix.go +++ b/src/os/user/listgroups_aix.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 cgo && !osusergo // +build cgo,!osusergo package user diff --git a/src/os/user/listgroups_solaris.go b/src/os/user/listgroups_solaris.go index f3cbf6ce4a0..d993d305702 100644 --- a/src/os/user/listgroups_solaris.go +++ b/src/os/user/listgroups_solaris.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 cgo && !osusergo // +build cgo,!osusergo // Even though this file requires no C, it is used to provide a diff --git a/src/os/user/listgroups_unix.go b/src/os/user/listgroups_unix.go index 70f7af7f979..c7b72062d5c 100644 --- a/src/os/user/listgroups_unix.go +++ b/src/os/user/listgroups_unix.go @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (dragonfly || darwin || freebsd || (!android && linux) || netbsd || openbsd) && cgo && !osusergo // +build dragonfly darwin freebsd !android,linux netbsd openbsd -// +build cgo,!osusergo +// +build cgo +// +build !osusergo package user diff --git a/src/os/user/lookup_android.go b/src/os/user/lookup_android.go index 8ca30b8c274..151aab49c20 100644 --- a/src/os/user/lookup_android.go +++ b/src/os/user/lookup_android.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 android // +build android package user diff --git a/src/os/user/lookup_stubs.go b/src/os/user/lookup_stubs.go index 178d814dda0..c975a11964c 100644 --- a/src/os/user/lookup_stubs.go +++ b/src/os/user/lookup_stubs.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 (!cgo && !windows && !plan9) || android || (osusergo && !windows && !plan9) // +build !cgo,!windows,!plan9 android osusergo,!windows,!plan9 package user diff --git a/src/os/user/lookup_unix.go b/src/os/user/lookup_unix.go index 0890cd8f2bf..ed8c2dee9dd 100644 --- a/src/os/user/lookup_unix.go +++ b/src/os/user/lookup_unix.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 (aix || darwin || dragonfly || freebsd || (js && wasm) || (!android && linux) || netbsd || openbsd || solaris) && (!cgo || osusergo) // +build aix darwin dragonfly freebsd js,wasm !android,linux netbsd openbsd solaris // +build !cgo osusergo diff --git a/src/os/user/lookup_unix_test.go b/src/os/user/lookup_unix_test.go index 72d3b475344..c697802171f 100644 --- a/src/os/user/lookup_unix_test.go +++ b/src/os/user/lookup_unix_test.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 (aix || darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && !cgo // +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris // +build !cgo diff --git a/src/os/wait_unimp.go b/src/os/wait_unimp.go index 0f4cdc45339..28dc2a5939f 100644 --- a/src/os/wait_unimp.go +++ b/src/os/wait_unimp.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 aix || darwin || dragonfly || (js && wasm) || netbsd || openbsd || solaris // +build aix darwin dragonfly js,wasm netbsd openbsd solaris package os diff --git a/src/os/wait_wait6.go b/src/os/wait_wait6.go index 5420b2db732..895f21069af 100644 --- a/src/os/wait_wait6.go +++ b/src/os/wait_wait6.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 freebsd // +build freebsd package os diff --git a/src/os/wait_waitid.go b/src/os/wait_waitid.go index 9c56eb2d415..1f3cb1cfe25 100644 --- a/src/os/wait_waitid.go +++ b/src/os/wait_waitid.go @@ -5,6 +5,7 @@ // We used to used this code for Darwin, but according to issue #19314 // waitid returns if the process is stopped, even when using WEXITED. +//go:build linux // +build linux package os diff --git a/src/path/filepath/example_unix_test.go b/src/path/filepath/example_unix_test.go index c9d69445188..4ce10095e67 100644 --- a/src/path/filepath/example_unix_test.go +++ b/src/path/filepath/example_unix_test.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 && !plan9 // +build !windows,!plan9 package filepath_test diff --git a/src/path/filepath/example_unix_walk_test.go b/src/path/filepath/example_unix_walk_test.go index c8a818fd6e9..d72efcebe61 100644 --- a/src/path/filepath/example_unix_walk_test.go +++ b/src/path/filepath/example_unix_walk_test.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 && !plan9 // +build !windows,!plan9 package filepath_test diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go index ec497d9e26b..d4b6f967a3f 100644 --- a/src/path/filepath/path_unix.go +++ b/src/path/filepath/path_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package filepath diff --git a/src/path/filepath/symlink_unix.go b/src/path/filepath/symlink_unix.go index d20e63a987e..657945a81a3 100644 --- a/src/path/filepath/symlink_unix.go +++ b/src/path/filepath/symlink_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package filepath diff --git a/src/plugin/plugin_dlopen.go b/src/plugin/plugin_dlopen.go index 9200fdc3cb1..aa85d4831ce 100644 --- a/src/plugin/plugin_dlopen.go +++ b/src/plugin/plugin_dlopen.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 (linux && cgo) || (darwin && cgo) || (freebsd && cgo) // +build linux,cgo darwin,cgo freebsd,cgo package plugin diff --git a/src/plugin/plugin_stubs.go b/src/plugin/plugin_stubs.go index 1893203017b..67855bed4ba 100644 --- a/src/plugin/plugin_stubs.go +++ b/src/plugin/plugin_stubs.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 (!linux && !freebsd && !darwin) || !cgo // +build !linux,!freebsd,!darwin !cgo package plugin diff --git a/src/plugin/plugin_test.go b/src/plugin/plugin_test.go index 30b79edaad7..4ce912132c9 100644 --- a/src/plugin/plugin_test.go +++ b/src/plugin/plugin_test.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 !linux || (linux && !arm64) // +build !linux linux,!arm64 package plugin_test diff --git a/src/regexp/exec2_test.go b/src/regexp/exec2_test.go index 7b86b41156e..6444bc12f90 100644 --- a/src/regexp/exec2_test.go +++ b/src/regexp/exec2_test.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 !race // +build !race package regexp diff --git a/src/runtime/auxv_none.go b/src/runtime/auxv_none.go index 3ca617b21eb..3178f1a154c 100644 --- a/src/runtime/auxv_none.go +++ b/src/runtime/auxv_none.go @@ -2,12 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !linux -// +build !darwin -// +build !dragonfly -// +build !freebsd -// +build !netbsd -// +build !solaris +//go:build !linux && !darwin && !dragonfly && !freebsd && !netbsd && !solaris +// +build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!solaris package runtime diff --git a/src/runtime/cgo/callbacks_traceback.go b/src/runtime/cgo/callbacks_traceback.go index cdadf9e66f6..7302c1eedfa 100644 --- a/src/runtime/cgo/callbacks_traceback.go +++ b/src/runtime/cgo/callbacks_traceback.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 darwin || linux // +build darwin linux package cgo diff --git a/src/runtime/cgo/dragonfly.go b/src/runtime/cgo/dragonfly.go index d6d69187b81..cfa6fe86e2f 100644 --- a/src/runtime/cgo/dragonfly.go +++ b/src/runtime/cgo/dragonfly.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 dragonfly // +build dragonfly package cgo diff --git a/src/runtime/cgo/freebsd.go b/src/runtime/cgo/freebsd.go index 5c9ddbdc710..d56702ec704 100644 --- a/src/runtime/cgo/freebsd.go +++ b/src/runtime/cgo/freebsd.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 freebsd // +build freebsd package cgo diff --git a/src/runtime/cgo/linux.go b/src/runtime/cgo/linux.go index 76c0192c20b..070d531beeb 100644 --- a/src/runtime/cgo/linux.go +++ b/src/runtime/cgo/linux.go @@ -5,6 +5,7 @@ // Linux system call wrappers that provide POSIX semantics through the // corresponding cgo->libc (nptl) wrappers for various system calls. +//go:build linux // +build linux package cgo diff --git a/src/runtime/cgo/mmap.go b/src/runtime/cgo/mmap.go index 00fb7fced6f..347ae6b363f 100644 --- a/src/runtime/cgo/mmap.go +++ b/src/runtime/cgo/mmap.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 (linux && amd64) || (linux && arm64) // +build linux,amd64 linux,arm64 package cgo diff --git a/src/runtime/cgo/netbsd.go b/src/runtime/cgo/netbsd.go index 74d0aed014b..7e17d1fcd25 100644 --- a/src/runtime/cgo/netbsd.go +++ b/src/runtime/cgo/netbsd.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 netbsd // +build netbsd package cgo diff --git a/src/runtime/cgo/openbsd.go b/src/runtime/cgo/openbsd.go index 81c73bf3993..f6215613c33 100644 --- a/src/runtime/cgo/openbsd.go +++ b/src/runtime/cgo/openbsd.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 openbsd // +build openbsd package cgo diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go index 6495fcb5f83..e6e8040ae08 100644 --- a/src/runtime/cgo/setenv.go +++ b/src/runtime/cgo/setenv.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package cgo diff --git a/src/runtime/cgo/sigaction.go b/src/runtime/cgo/sigaction.go index 076fbc1a0a5..ee63ea4c09e 100644 --- a/src/runtime/cgo/sigaction.go +++ b/src/runtime/cgo/sigaction.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 (linux && amd64) || (freebsd && amd64) || (linux && arm64) // +build linux,amd64 freebsd,amd64 linux,arm64 package cgo diff --git a/src/runtime/cgo_mmap.go b/src/runtime/cgo_mmap.go index d5e0cc1e3ee..17d26b4cc82 100644 --- a/src/runtime/cgo_mmap.go +++ b/src/runtime/cgo_mmap.go @@ -4,6 +4,7 @@ // Support for memory sanitizer. See runtime/cgo/mmap.go. +//go:build (linux && amd64) || (linux && arm64) // +build linux,amd64 linux,arm64 package runtime diff --git a/src/runtime/cgo_ppc64x.go b/src/runtime/cgo_ppc64x.go index fb2da32c7e0..4dc92ea3211 100644 --- a/src/runtime/cgo_ppc64x.go +++ b/src/runtime/cgo_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package runtime diff --git a/src/runtime/cgo_sigaction.go b/src/runtime/cgo_sigaction.go index de634dc9573..15690ecb0bf 100644 --- a/src/runtime/cgo_sigaction.go +++ b/src/runtime/cgo_sigaction.go @@ -4,6 +4,7 @@ // Support for memory sanitizer. See runtime/cgo/sigaction.go. +//go:build (linux && amd64) || (freebsd && amd64) || (linux && arm64) // +build linux,amd64 freebsd,amd64 linux,arm64 package runtime diff --git a/src/runtime/cputicks.go b/src/runtime/cputicks.go index 7beb57ea12d..7c926f4a2b8 100644 --- a/src/runtime/cputicks.go +++ b/src/runtime/cputicks.go @@ -2,13 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !arm -// +build !arm64 -// +build !mips64 -// +build !mips64le -// +build !mips -// +build !mipsle -// +build !wasm +//go:build !arm && !arm64 && !mips64 && !mips64le && !mips && !mipsle && !wasm +// +build !arm,!arm64,!mips64,!mips64le,!mips,!mipsle,!wasm package runtime diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 140c170ddc1..7d25c51aa2a 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.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 cgo // +build cgo package runtime_test diff --git a/src/runtime/crash_nonunix_test.go b/src/runtime/crash_nonunix_test.go index 06c197ec2b2..5f61476f217 100644 --- a/src/runtime/crash_nonunix_test.go +++ b/src/runtime/crash_nonunix_test.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 || plan9 || (js && wasm) // +build windows plan9 js,wasm package runtime_test diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go index 803b031873f..341c35ca560 100644 --- a/src/runtime/crash_unix_test.go +++ b/src/runtime/crash_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package runtime_test diff --git a/src/runtime/debug/panic_test.go b/src/runtime/debug/panic_test.go index b67a3de4f98..b93631e1d83 100644 --- a/src/runtime/debug/panic_test.go +++ b/src/runtime/debug/panic_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build aix darwin dragonfly freebsd linux netbsd openbsd // TODO: test on Windows? diff --git a/src/runtime/debug_test.go b/src/runtime/debug_test.go index a0b3f843826..c4c41f95f2d 100644 --- a/src/runtime/debug_test.go +++ b/src/runtime/debug_test.go @@ -9,9 +9,8 @@ // spends all of its time in the race runtime, which isn't a safe // point. -// +build amd64 -// +build linux -// +build !race +//go:build amd64 && linux && !race +// +build amd64,linux,!race package runtime_test diff --git a/src/runtime/debugcall.go b/src/runtime/debugcall.go index efc68a767d4..2fe0b1d12f1 100644 --- a/src/runtime/debugcall.go +++ b/src/runtime/debugcall.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 amd64 // +build amd64 package runtime diff --git a/src/runtime/debuglog_off.go b/src/runtime/debuglog_off.go index bb3e172498e..dd381569992 100644 --- a/src/runtime/debuglog_off.go +++ b/src/runtime/debuglog_off.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 !debuglog // +build !debuglog package runtime diff --git a/src/runtime/debuglog_on.go b/src/runtime/debuglog_on.go index 3d477e8ef5f..2fcdbe70d14 100644 --- a/src/runtime/debuglog_on.go +++ b/src/runtime/debuglog_on.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 debuglog // +build debuglog package runtime diff --git a/src/runtime/defs1_linux.go b/src/runtime/defs1_linux.go index 4085d6f4182..df9c05dd5ed 100644 --- a/src/runtime/defs1_linux.go +++ b/src/runtime/defs1_linux.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 ignore // +build ignore /* diff --git a/src/runtime/defs2_linux.go b/src/runtime/defs2_linux.go index 87e19c1598a..d016db7d027 100644 --- a/src/runtime/defs2_linux.go +++ b/src/runtime/defs2_linux.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 ignore // +build ignore /* diff --git a/src/runtime/defs3_linux.go b/src/runtime/defs3_linux.go index 31f2191c763..0a06aa23707 100644 --- a/src/runtime/defs3_linux.go +++ b/src/runtime/defs3_linux.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 ignore // +build ignore /* diff --git a/src/runtime/defs_aix.go b/src/runtime/defs_aix.go index 23a6cac2bbd..1605002ea20 100644 --- a/src/runtime/defs_aix.go +++ b/src/runtime/defs_aix.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 ignore // +build ignore /* diff --git a/src/runtime/defs_aix_ppc64.go b/src/runtime/defs_aix_ppc64.go index a53fcc59336..f84ff1160d0 100644 --- a/src/runtime/defs_aix_ppc64.go +++ b/src/runtime/defs_aix_ppc64.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 aix // +build aix package runtime diff --git a/src/runtime/defs_arm_linux.go b/src/runtime/defs_arm_linux.go index e51dd32b5b2..f6b6dd2c09e 100644 --- a/src/runtime/defs_arm_linux.go +++ b/src/runtime/defs_arm_linux.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 ignore // +build ignore /* diff --git a/src/runtime/defs_darwin.go b/src/runtime/defs_darwin.go index cc8c4753879..2d41a97b574 100644 --- a/src/runtime/defs_darwin.go +++ b/src/runtime/defs_darwin.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 ignore // +build ignore /* diff --git a/src/runtime/defs_dragonfly.go b/src/runtime/defs_dragonfly.go index 95014fe6e71..225258901f1 100644 --- a/src/runtime/defs_dragonfly.go +++ b/src/runtime/defs_dragonfly.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 ignore // +build ignore /* diff --git a/src/runtime/defs_freebsd.go b/src/runtime/defs_freebsd.go index e196dff0769..c258759549c 100644 --- a/src/runtime/defs_freebsd.go +++ b/src/runtime/defs_freebsd.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 ignore // +build ignore /* diff --git a/src/runtime/defs_linux.go b/src/runtime/defs_linux.go index 7b140633866..022ef19427e 100644 --- a/src/runtime/defs_linux.go +++ b/src/runtime/defs_linux.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 ignore // +build ignore /* diff --git a/src/runtime/defs_linux_mips64x.go b/src/runtime/defs_linux_mips64x.go index 1fb423b1988..2cafad20cf9 100644 --- a/src/runtime/defs_linux_mips64x.go +++ b/src/runtime/defs_linux_mips64x.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 (mips64 || mips64le) && linux // +build mips64 mips64le // +build linux diff --git a/src/runtime/defs_linux_mipsx.go b/src/runtime/defs_linux_mipsx.go index 9315ba9346a..3a8dfe2e990 100644 --- a/src/runtime/defs_linux_mipsx.go +++ b/src/runtime/defs_linux_mipsx.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 (mips || mipsle) && linux // +build mips mipsle // +build linux diff --git a/src/runtime/defs_netbsd.go b/src/runtime/defs_netbsd.go index 3f5ce5adcac..755992d18e0 100644 --- a/src/runtime/defs_netbsd.go +++ b/src/runtime/defs_netbsd.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 ignore // +build ignore /* diff --git a/src/runtime/defs_netbsd_386.go b/src/runtime/defs_netbsd_386.go index c26f246077f..03c9c2de59e 100644 --- a/src/runtime/defs_netbsd_386.go +++ b/src/runtime/defs_netbsd_386.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 ignore // +build ignore /* diff --git a/src/runtime/defs_netbsd_amd64.go b/src/runtime/defs_netbsd_amd64.go index f18a7b1fe32..9fda1d7d226 100644 --- a/src/runtime/defs_netbsd_amd64.go +++ b/src/runtime/defs_netbsd_amd64.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 ignore // +build ignore /* diff --git a/src/runtime/defs_netbsd_arm.go b/src/runtime/defs_netbsd_arm.go index cb0dce66b4d..e7f4f6cece7 100644 --- a/src/runtime/defs_netbsd_arm.go +++ b/src/runtime/defs_netbsd_arm.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 ignore // +build ignore /* diff --git a/src/runtime/defs_openbsd.go b/src/runtime/defs_openbsd.go index ff7e21c71e3..8d323449d1c 100644 --- a/src/runtime/defs_openbsd.go +++ b/src/runtime/defs_openbsd.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 ignore // +build ignore /* diff --git a/src/runtime/defs_solaris.go b/src/runtime/defs_solaris.go index 22df59094d7..e644f9c6ddd 100644 --- a/src/runtime/defs_solaris.go +++ b/src/runtime/defs_solaris.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 ignore // +build ignore /* diff --git a/src/runtime/defs_solaris_amd64.go b/src/runtime/defs_solaris_amd64.go index 04931788805..a0b38319a5d 100644 --- a/src/runtime/defs_solaris_amd64.go +++ b/src/runtime/defs_solaris_amd64.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 ignore // +build ignore /* diff --git a/src/runtime/env_posix.go b/src/runtime/env_posix.go index af353bbcd9a..95517b2a958 100644 --- a/src/runtime/env_posix.go +++ b/src/runtime/env_posix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows || plan9 // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows plan9 package runtime diff --git a/src/runtime/export_debug_test.go b/src/runtime/export_debug_test.go index ed4242ef241..18ccecd5cd7 100644 --- a/src/runtime/export_debug_test.go +++ b/src/runtime/export_debug_test.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64 -// +build linux +//go:build amd64 && linux +// +build amd64,linux package runtime diff --git a/src/runtime/export_futex_test.go b/src/runtime/export_futex_test.go index a727a931145..34c970d6d2d 100644 --- a/src/runtime/export_futex_test.go +++ b/src/runtime/export_futex_test.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 dragonfly || freebsd || linux // +build dragonfly freebsd linux package runtime diff --git a/src/runtime/export_mmap_test.go b/src/runtime/export_mmap_test.go index aeaf37f64be..bf4a8158991 100644 --- a/src/runtime/export_mmap_test.go +++ b/src/runtime/export_mmap_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // Export guts for testing. diff --git a/src/runtime/export_pipe2_test.go b/src/runtime/export_pipe2_test.go index 9d580d33134..31c8e43b3f4 100644 --- a/src/runtime/export_pipe2_test.go +++ b/src/runtime/export_pipe2_test.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 freebsd || linux || netbsd || openbsd || solaris // +build freebsd linux netbsd openbsd solaris package runtime diff --git a/src/runtime/export_pipe_test.go b/src/runtime/export_pipe_test.go index 8f66770fb98..82032e6bfb4 100644 --- a/src/runtime/export_pipe_test.go +++ b/src/runtime/export_pipe_test.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 aix || darwin || dragonfly // +build aix darwin dragonfly package runtime diff --git a/src/runtime/export_unix_test.go b/src/runtime/export_unix_test.go index 307c63fd685..215e234286b 100644 --- a/src/runtime/export_unix_test.go +++ b/src/runtime/export_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package runtime diff --git a/src/runtime/futex_test.go b/src/runtime/futex_test.go index 3051bd58801..10a735327a7 100644 --- a/src/runtime/futex_test.go +++ b/src/runtime/futex_test.go @@ -6,6 +6,7 @@ // The race detector emits calls to split stack functions so it breaks // the test. +//go:build (dragonfly || freebsd || linux) && !race // +build dragonfly freebsd linux // +build !race diff --git a/src/runtime/hash32.go b/src/runtime/hash32.go index 966f70e1aa9..7fa8eb7cab1 100644 --- a/src/runtime/hash32.go +++ b/src/runtime/hash32.go @@ -6,6 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ +//go:build 386 || arm || mips || mipsle // +build 386 arm mips mipsle package runtime diff --git a/src/runtime/hash64.go b/src/runtime/hash64.go index d1283824ad9..1bee666bd7f 100644 --- a/src/runtime/hash64.go +++ b/src/runtime/hash64.go @@ -6,6 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ +//go:build amd64 || arm64 || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x || wasm // +build amd64 arm64 mips64 mips64le ppc64 ppc64le riscv64 s390x wasm package runtime diff --git a/src/runtime/internal/atomic/atomic_386.go b/src/runtime/internal/atomic/atomic_386.go index 1bfcb1143d3..d4aed6b6717 100644 --- a/src/runtime/internal/atomic/atomic_386.go +++ b/src/runtime/internal/atomic/atomic_386.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 386 // +build 386 package atomic diff --git a/src/runtime/internal/atomic/atomic_arm.go b/src/runtime/internal/atomic/atomic_arm.go index 546b3d61207..2e9374ca269 100644 --- a/src/runtime/internal/atomic/atomic_arm.go +++ b/src/runtime/internal/atomic/atomic_arm.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 arm // +build arm package atomic diff --git a/src/runtime/internal/atomic/atomic_arm64.go b/src/runtime/internal/atomic/atomic_arm64.go index d49bee8936f..131c687e1ba 100644 --- a/src/runtime/internal/atomic/atomic_arm64.go +++ b/src/runtime/internal/atomic/atomic_arm64.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 arm64 // +build arm64 package atomic diff --git a/src/runtime/internal/atomic/atomic_mips64x.go b/src/runtime/internal/atomic/atomic_mips64x.go index b0109d72b06..5b407ebc7a5 100644 --- a/src/runtime/internal/atomic/atomic_mips64x.go +++ b/src/runtime/internal/atomic/atomic_mips64x.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 mips64 || mips64le // +build mips64 mips64le package atomic diff --git a/src/runtime/internal/atomic/atomic_mipsx.go b/src/runtime/internal/atomic/atomic_mipsx.go index 1336b501214..80cd65b3338 100644 --- a/src/runtime/internal/atomic/atomic_mipsx.go +++ b/src/runtime/internal/atomic/atomic_mipsx.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 mips || mipsle // +build mips mipsle // Export some functions via linkname to assembly in sync/atomic. diff --git a/src/runtime/internal/atomic/atomic_ppc64x.go b/src/runtime/internal/atomic/atomic_ppc64x.go index e4b109f0ec1..98101e32878 100644 --- a/src/runtime/internal/atomic/atomic_ppc64x.go +++ b/src/runtime/internal/atomic/atomic_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package atomic diff --git a/src/runtime/internal/atomic/stubs.go b/src/runtime/internal/atomic/stubs.go index 62e30d17882..1275884b2f1 100644 --- a/src/runtime/internal/atomic/stubs.go +++ b/src/runtime/internal/atomic/stubs.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 !wasm // +build !wasm package atomic diff --git a/src/runtime/internal/sys/gengoos.go b/src/runtime/internal/sys/gengoos.go index 9bbc48d94f2..51f64a6e5c6 100644 --- a/src/runtime/internal/sys/gengoos.go +++ b/src/runtime/internal/sys/gengoos.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 ignore // +build ignore package main diff --git a/src/runtime/internal/sys/intrinsics.go b/src/runtime/internal/sys/intrinsics.go index 3c8898236c7..e76d8dd0646 100644 --- a/src/runtime/internal/sys/intrinsics.go +++ b/src/runtime/internal/sys/intrinsics.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 !386 // +build !386 // TODO finish intrinsifying 386, deadcode the assembly, remove build tags, merge w/ intrinsics_common diff --git a/src/runtime/internal/sys/intrinsics_stubs.go b/src/runtime/internal/sys/intrinsics_stubs.go index 9cbf48216c2..bf1494d48aa 100644 --- a/src/runtime/internal/sys/intrinsics_stubs.go +++ b/src/runtime/internal/sys/intrinsics_stubs.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 386 // +build 386 package sys diff --git a/src/runtime/internal/sys/zgoarch_386.go b/src/runtime/internal/sys/zgoarch_386.go index c286d0df2b3..98a2401bfe9 100644 --- a/src/runtime/internal/sys/zgoarch_386.go +++ b/src/runtime/internal/sys/zgoarch_386.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build 386 // +build 386 package sys diff --git a/src/runtime/internal/sys/zgoarch_amd64.go b/src/runtime/internal/sys/zgoarch_amd64.go index d21c1d7d2a7..d8faa5c7860 100644 --- a/src/runtime/internal/sys/zgoarch_amd64.go +++ b/src/runtime/internal/sys/zgoarch_amd64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build amd64 // +build amd64 package sys diff --git a/src/runtime/internal/sys/zgoarch_arm.go b/src/runtime/internal/sys/zgoarch_arm.go index 9085fb0ea84..b64a69c9b44 100644 --- a/src/runtime/internal/sys/zgoarch_arm.go +++ b/src/runtime/internal/sys/zgoarch_arm.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build arm // +build arm package sys diff --git a/src/runtime/internal/sys/zgoarch_arm64.go b/src/runtime/internal/sys/zgoarch_arm64.go index ed7ef2ebcb3..de6f85347b1 100644 --- a/src/runtime/internal/sys/zgoarch_arm64.go +++ b/src/runtime/internal/sys/zgoarch_arm64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build arm64 // +build arm64 package sys diff --git a/src/runtime/internal/sys/zgoarch_arm64be.go b/src/runtime/internal/sys/zgoarch_arm64be.go index faf31110535..b762bb069f8 100644 --- a/src/runtime/internal/sys/zgoarch_arm64be.go +++ b/src/runtime/internal/sys/zgoarch_arm64be.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build arm64be // +build arm64be package sys diff --git a/src/runtime/internal/sys/zgoarch_armbe.go b/src/runtime/internal/sys/zgoarch_armbe.go index cb28301e0be..e5297e4b169 100644 --- a/src/runtime/internal/sys/zgoarch_armbe.go +++ b/src/runtime/internal/sys/zgoarch_armbe.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build armbe // +build armbe package sys diff --git a/src/runtime/internal/sys/zgoarch_mips.go b/src/runtime/internal/sys/zgoarch_mips.go index 315dea1c846..b5f4ed390c6 100644 --- a/src/runtime/internal/sys/zgoarch_mips.go +++ b/src/runtime/internal/sys/zgoarch_mips.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mips // +build mips package sys diff --git a/src/runtime/internal/sys/zgoarch_mips64.go b/src/runtime/internal/sys/zgoarch_mips64.go index 5258cbfbe70..73777cceb21 100644 --- a/src/runtime/internal/sys/zgoarch_mips64.go +++ b/src/runtime/internal/sys/zgoarch_mips64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mips64 // +build mips64 package sys diff --git a/src/runtime/internal/sys/zgoarch_mips64le.go b/src/runtime/internal/sys/zgoarch_mips64le.go index 1721698518f..0c81c36c097 100644 --- a/src/runtime/internal/sys/zgoarch_mips64le.go +++ b/src/runtime/internal/sys/zgoarch_mips64le.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mips64le // +build mips64le package sys diff --git a/src/runtime/internal/sys/zgoarch_mips64p32.go b/src/runtime/internal/sys/zgoarch_mips64p32.go index 44c4624da91..d63ce27d24d 100644 --- a/src/runtime/internal/sys/zgoarch_mips64p32.go +++ b/src/runtime/internal/sys/zgoarch_mips64p32.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mips64p32 // +build mips64p32 package sys diff --git a/src/runtime/internal/sys/zgoarch_mips64p32le.go b/src/runtime/internal/sys/zgoarch_mips64p32le.go index eb63225430d..2d577890b2e 100644 --- a/src/runtime/internal/sys/zgoarch_mips64p32le.go +++ b/src/runtime/internal/sys/zgoarch_mips64p32le.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mips64p32le // +build mips64p32le package sys diff --git a/src/runtime/internal/sys/zgoarch_mipsle.go b/src/runtime/internal/sys/zgoarch_mipsle.go index e0ebfbf0385..8af919d03a3 100644 --- a/src/runtime/internal/sys/zgoarch_mipsle.go +++ b/src/runtime/internal/sys/zgoarch_mipsle.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build mipsle // +build mipsle package sys diff --git a/src/runtime/internal/sys/zgoarch_ppc.go b/src/runtime/internal/sys/zgoarch_ppc.go index ef26aa32011..f6f12a5ddce 100644 --- a/src/runtime/internal/sys/zgoarch_ppc.go +++ b/src/runtime/internal/sys/zgoarch_ppc.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build ppc // +build ppc package sys diff --git a/src/runtime/internal/sys/zgoarch_ppc64.go b/src/runtime/internal/sys/zgoarch_ppc64.go index 32c2d46d4c9..a8379601f47 100644 --- a/src/runtime/internal/sys/zgoarch_ppc64.go +++ b/src/runtime/internal/sys/zgoarch_ppc64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build ppc64 // +build ppc64 package sys diff --git a/src/runtime/internal/sys/zgoarch_ppc64le.go b/src/runtime/internal/sys/zgoarch_ppc64le.go index 3a6e56763c0..f2ec5dcba72 100644 --- a/src/runtime/internal/sys/zgoarch_ppc64le.go +++ b/src/runtime/internal/sys/zgoarch_ppc64le.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build ppc64le // +build ppc64le package sys diff --git a/src/runtime/internal/sys/zgoarch_riscv.go b/src/runtime/internal/sys/zgoarch_riscv.go index d8f6b490935..83a3312f5f3 100644 --- a/src/runtime/internal/sys/zgoarch_riscv.go +++ b/src/runtime/internal/sys/zgoarch_riscv.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build riscv // +build riscv package sys diff --git a/src/runtime/internal/sys/zgoarch_riscv64.go b/src/runtime/internal/sys/zgoarch_riscv64.go index 0ba843b5ac5..1dfcc84997b 100644 --- a/src/runtime/internal/sys/zgoarch_riscv64.go +++ b/src/runtime/internal/sys/zgoarch_riscv64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build riscv64 // +build riscv64 package sys diff --git a/src/runtime/internal/sys/zgoarch_s390.go b/src/runtime/internal/sys/zgoarch_s390.go index 20a1b234a65..91aba5a0f6c 100644 --- a/src/runtime/internal/sys/zgoarch_s390.go +++ b/src/runtime/internal/sys/zgoarch_s390.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build s390 // +build s390 package sys diff --git a/src/runtime/internal/sys/zgoarch_s390x.go b/src/runtime/internal/sys/zgoarch_s390x.go index ffdda0c827a..edce50234e5 100644 --- a/src/runtime/internal/sys/zgoarch_s390x.go +++ b/src/runtime/internal/sys/zgoarch_s390x.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build s390x // +build s390x package sys diff --git a/src/runtime/internal/sys/zgoarch_sparc.go b/src/runtime/internal/sys/zgoarch_sparc.go index b4949510d54..5ae9560ab01 100644 --- a/src/runtime/internal/sys/zgoarch_sparc.go +++ b/src/runtime/internal/sys/zgoarch_sparc.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build sparc // +build sparc package sys diff --git a/src/runtime/internal/sys/zgoarch_sparc64.go b/src/runtime/internal/sys/zgoarch_sparc64.go index 0f6df411ce8..e2a0134affd 100644 --- a/src/runtime/internal/sys/zgoarch_sparc64.go +++ b/src/runtime/internal/sys/zgoarch_sparc64.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build sparc64 // +build sparc64 package sys diff --git a/src/runtime/internal/sys/zgoarch_wasm.go b/src/runtime/internal/sys/zgoarch_wasm.go index e69afb0cb3a..52e85dea371 100644 --- a/src/runtime/internal/sys/zgoarch_wasm.go +++ b/src/runtime/internal/sys/zgoarch_wasm.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build wasm // +build wasm package sys diff --git a/src/runtime/internal/sys/zgoos_aix.go b/src/runtime/internal/sys/zgoos_aix.go index 0631d02aa55..f3b907471f6 100644 --- a/src/runtime/internal/sys/zgoos_aix.go +++ b/src/runtime/internal/sys/zgoos_aix.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build aix // +build aix package sys diff --git a/src/runtime/internal/sys/zgoos_android.go b/src/runtime/internal/sys/zgoos_android.go index d356a40bec6..e28baf7c481 100644 --- a/src/runtime/internal/sys/zgoos_android.go +++ b/src/runtime/internal/sys/zgoos_android.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build android // +build android package sys diff --git a/src/runtime/internal/sys/zgoos_darwin.go b/src/runtime/internal/sys/zgoos_darwin.go index 6aa2db7e3a7..3c7f7b543ee 100644 --- a/src/runtime/internal/sys/zgoos_darwin.go +++ b/src/runtime/internal/sys/zgoos_darwin.go @@ -1,7 +1,7 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. -// +build !ios -// +build darwin +//go:build !ios && darwin +// +build !ios,darwin package sys diff --git a/src/runtime/internal/sys/zgoos_dragonfly.go b/src/runtime/internal/sys/zgoos_dragonfly.go index 88ee1174f1e..f844d29e2a1 100644 --- a/src/runtime/internal/sys/zgoos_dragonfly.go +++ b/src/runtime/internal/sys/zgoos_dragonfly.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build dragonfly // +build dragonfly package sys diff --git a/src/runtime/internal/sys/zgoos_freebsd.go b/src/runtime/internal/sys/zgoos_freebsd.go index 8de2ec0559e..8999a2797af 100644 --- a/src/runtime/internal/sys/zgoos_freebsd.go +++ b/src/runtime/internal/sys/zgoos_freebsd.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build freebsd // +build freebsd package sys diff --git a/src/runtime/internal/sys/zgoos_hurd.go b/src/runtime/internal/sys/zgoos_hurd.go index 183ccb02a1e..a546488bf89 100644 --- a/src/runtime/internal/sys/zgoos_hurd.go +++ b/src/runtime/internal/sys/zgoos_hurd.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build hurd // +build hurd package sys diff --git a/src/runtime/internal/sys/zgoos_illumos.go b/src/runtime/internal/sys/zgoos_illumos.go index d04134e1df5..02a4ca06e82 100644 --- a/src/runtime/internal/sys/zgoos_illumos.go +++ b/src/runtime/internal/sys/zgoos_illumos.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build illumos // +build illumos package sys diff --git a/src/runtime/internal/sys/zgoos_ios.go b/src/runtime/internal/sys/zgoos_ios.go index cf6e9d61f02..033eec623df 100644 --- a/src/runtime/internal/sys/zgoos_ios.go +++ b/src/runtime/internal/sys/zgoos_ios.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build ios // +build ios package sys diff --git a/src/runtime/internal/sys/zgoos_js.go b/src/runtime/internal/sys/zgoos_js.go index 1d9279ab389..28226ad60ad 100644 --- a/src/runtime/internal/sys/zgoos_js.go +++ b/src/runtime/internal/sys/zgoos_js.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build js // +build js package sys diff --git a/src/runtime/internal/sys/zgoos_linux.go b/src/runtime/internal/sys/zgoos_linux.go index 0f718d704ff..01546e4b9f2 100644 --- a/src/runtime/internal/sys/zgoos_linux.go +++ b/src/runtime/internal/sys/zgoos_linux.go @@ -1,7 +1,7 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. -// +build !android -// +build linux +//go:build !android && linux +// +build !android,linux package sys diff --git a/src/runtime/internal/sys/zgoos_netbsd.go b/src/runtime/internal/sys/zgoos_netbsd.go index 2ae149ff13c..9d658b20ee2 100644 --- a/src/runtime/internal/sys/zgoos_netbsd.go +++ b/src/runtime/internal/sys/zgoos_netbsd.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build netbsd // +build netbsd package sys diff --git a/src/runtime/internal/sys/zgoos_openbsd.go b/src/runtime/internal/sys/zgoos_openbsd.go index 7d4d61e4ca3..0f55454a953 100644 --- a/src/runtime/internal/sys/zgoos_openbsd.go +++ b/src/runtime/internal/sys/zgoos_openbsd.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build openbsd // +build openbsd package sys diff --git a/src/runtime/internal/sys/zgoos_plan9.go b/src/runtime/internal/sys/zgoos_plan9.go index 30aec46df33..d0347464d6d 100644 --- a/src/runtime/internal/sys/zgoos_plan9.go +++ b/src/runtime/internal/sys/zgoos_plan9.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build plan9 // +build plan9 package sys diff --git a/src/runtime/internal/sys/zgoos_solaris.go b/src/runtime/internal/sys/zgoos_solaris.go index 4bb8c99bce0..05c3007e2c2 100644 --- a/src/runtime/internal/sys/zgoos_solaris.go +++ b/src/runtime/internal/sys/zgoos_solaris.go @@ -1,7 +1,7 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. -// +build !illumos -// +build solaris +//go:build !illumos && solaris +// +build !illumos,solaris package sys diff --git a/src/runtime/internal/sys/zgoos_windows.go b/src/runtime/internal/sys/zgoos_windows.go index d1f42902046..7d07fa3a451 100644 --- a/src/runtime/internal/sys/zgoos_windows.go +++ b/src/runtime/internal/sys/zgoos_windows.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build windows // +build windows package sys diff --git a/src/runtime/internal/sys/zgoos_zos.go b/src/runtime/internal/sys/zgoos_zos.go index d22be46fc02..d6e5b9b0cb2 100644 --- a/src/runtime/internal/sys/zgoos_zos.go +++ b/src/runtime/internal/sys/zgoos_zos.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +//go:build zos // +build zos package sys diff --git a/src/runtime/lfstack_32bit.go b/src/runtime/lfstack_32bit.go index f07ff1c06b4..c00f0965bd6 100644 --- a/src/runtime/lfstack_32bit.go +++ b/src/runtime/lfstack_32bit.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 386 || arm || mips || mipsle // +build 386 arm mips mipsle package runtime diff --git a/src/runtime/lfstack_64bit.go b/src/runtime/lfstack_64bit.go index 9d821b989ef..4812dd11565 100644 --- a/src/runtime/lfstack_64bit.go +++ b/src/runtime/lfstack_64bit.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 amd64 || arm64 || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x || wasm // +build amd64 arm64 mips64 mips64le ppc64 ppc64le riscv64 s390x wasm package runtime diff --git a/src/runtime/libfuzzer.go b/src/runtime/libfuzzer.go index 0161955f09f..578bce04149 100644 --- a/src/runtime/libfuzzer.go +++ b/src/runtime/libfuzzer.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 libfuzzer // +build libfuzzer package runtime diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go index 91467fdfae0..017b481c642 100644 --- a/src/runtime/lock_futex.go +++ b/src/runtime/lock_futex.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 dragonfly || freebsd || linux // +build dragonfly freebsd linux package runtime diff --git a/src/runtime/lock_js.go b/src/runtime/lock_js.go index 14bdc76842c..04e7e85c126 100644 --- a/src/runtime/lock_js.go +++ b/src/runtime/lock_js.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 js && wasm // +build js,wasm package runtime diff --git a/src/runtime/lock_sema.go b/src/runtime/lock_sema.go index 671e524e458..3c0a7ca67ed 100644 --- a/src/runtime/lock_sema.go +++ b/src/runtime/lock_sema.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 aix || darwin || netbsd || openbsd || plan9 || solaris || windows // +build aix darwin netbsd openbsd plan9 solaris windows package runtime diff --git a/src/runtime/lockrank_off.go b/src/runtime/lockrank_off.go index 7dcd8f5fe96..f3d2c009145 100644 --- a/src/runtime/lockrank_off.go +++ b/src/runtime/lockrank_off.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 !goexperiment.staticlockranking // +build !goexperiment.staticlockranking package runtime diff --git a/src/runtime/lockrank_on.go b/src/runtime/lockrank_on.go index 88ac95a0047..702bf5f24cc 100644 --- a/src/runtime/lockrank_on.go +++ b/src/runtime/lockrank_on.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 goexperiment.staticlockranking // +build goexperiment.staticlockranking package runtime diff --git a/src/runtime/mem_bsd.go b/src/runtime/mem_bsd.go index bc672019fb5..dcbb9a1d51e 100644 --- a/src/runtime/mem_bsd.go +++ b/src/runtime/mem_bsd.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 dragonfly || freebsd || netbsd || openbsd || solaris // +build dragonfly freebsd netbsd openbsd solaris package runtime diff --git a/src/runtime/mem_js.go b/src/runtime/mem_js.go index 957ed36ffa0..fe940360c0e 100644 --- a/src/runtime/mem_js.go +++ b/src/runtime/mem_js.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 js && wasm // +build js,wasm package runtime diff --git a/src/runtime/mkduff.go b/src/runtime/mkduff.go index ef297f073e0..8632fe08a3d 100644 --- a/src/runtime/mkduff.go +++ b/src/runtime/mkduff.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 ignore // +build ignore // runtime·duffzero is a Duff's device for zeroing memory. diff --git a/src/runtime/mkfastlog2table.go b/src/runtime/mkfastlog2table.go index d6502923948..8d78a3923a0 100644 --- a/src/runtime/mkfastlog2table.go +++ b/src/runtime/mkfastlog2table.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 ignore // +build ignore // fastlog2Table contains log2 approximations for 5 binary digits. diff --git a/src/runtime/mkpreempt.go b/src/runtime/mkpreempt.go index 1d614dd0039..3069d6ed04e 100644 --- a/src/runtime/mkpreempt.go +++ b/src/runtime/mkpreempt.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 ignore // +build ignore // mkpreempt generates the asyncPreempt functions for each diff --git a/src/runtime/mksizeclasses.go b/src/runtime/mksizeclasses.go index b92d1fed5f8..b4a117d3438 100644 --- a/src/runtime/mksizeclasses.go +++ b/src/runtime/mksizeclasses.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 ignore // +build ignore // Generate tables for small malloc size classes. diff --git a/src/runtime/mmap.go b/src/runtime/mmap.go index 1b1848b79ec..7460eb31046 100644 --- a/src/runtime/mmap.go +++ b/src/runtime/mmap.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 !aix && !darwin && !js && (!linux || !amd64) && (!linux || !arm64) && !openbsd && !plan9 && !solaris && !windows // +build !aix // +build !darwin // +build !js diff --git a/src/runtime/mpagealloc_32bit.go b/src/runtime/mpagealloc_32bit.go index 331dadade92..fceb4e7a187 100644 --- a/src/runtime/mpagealloc_32bit.go +++ b/src/runtime/mpagealloc_32bit.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 386 || arm || mips || mipsle || wasm || (ios && arm64) // +build 386 arm mips mipsle wasm ios,arm64 // wasm is a treated as a 32-bit architecture for the purposes of the page diff --git a/src/runtime/mpagealloc_64bit.go b/src/runtime/mpagealloc_64bit.go index ffacb46c18e..16577346a7f 100644 --- a/src/runtime/mpagealloc_64bit.go +++ b/src/runtime/mpagealloc_64bit.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 amd64 || (!ios && arm64) || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x // +build amd64 !ios,arm64 mips64 mips64le ppc64 ppc64le riscv64 s390x // See mpagealloc_32bit.go for why ios/arm64 is excluded here. diff --git a/src/runtime/msan.go b/src/runtime/msan.go index 6a5960b0a8e..25aaf94e26c 100644 --- a/src/runtime/msan.go +++ b/src/runtime/msan.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 msan // +build msan package runtime diff --git a/src/runtime/msan0.go b/src/runtime/msan0.go index 374d13f30b5..b1096a6750e 100644 --- a/src/runtime/msan0.go +++ b/src/runtime/msan0.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 !msan // +build !msan // Dummy MSan support API, used when not built with -msan. diff --git a/src/runtime/nbpipe_fcntl_libc_test.go b/src/runtime/nbpipe_fcntl_libc_test.go index b38c58399bc..076a722eb73 100644 --- a/src/runtime/nbpipe_fcntl_libc_test.go +++ b/src/runtime/nbpipe_fcntl_libc_test.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 aix || darwin || solaris // +build aix darwin solaris package runtime_test diff --git a/src/runtime/nbpipe_fcntl_unix_test.go b/src/runtime/nbpipe_fcntl_unix_test.go index 75acdb62ddd..6d5e4ff0215 100644 --- a/src/runtime/nbpipe_fcntl_unix_test.go +++ b/src/runtime/nbpipe_fcntl_unix_test.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package runtime_test diff --git a/src/runtime/nbpipe_pipe.go b/src/runtime/nbpipe_pipe.go index 822b2944dbf..d92cf97217b 100644 --- a/src/runtime/nbpipe_pipe.go +++ b/src/runtime/nbpipe_pipe.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 aix || darwin || dragonfly // +build aix darwin dragonfly package runtime diff --git a/src/runtime/nbpipe_pipe2.go b/src/runtime/nbpipe_pipe2.go index e3639d99b15..f138d1f9561 100644 --- a/src/runtime/nbpipe_pipe2.go +++ b/src/runtime/nbpipe_pipe2.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 freebsd || linux || netbsd || openbsd || solaris // +build freebsd linux netbsd openbsd solaris package runtime diff --git a/src/runtime/nbpipe_test.go b/src/runtime/nbpipe_test.go index d739f57864a..1d6a9b525c8 100644 --- a/src/runtime/nbpipe_test.go +++ b/src/runtime/nbpipe_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package runtime_test diff --git a/src/runtime/netpoll.go b/src/runtime/netpoll.go index 77eb3aa4c63..afb208a4550 100644 --- a/src/runtime/netpoll.go +++ b/src/runtime/netpoll.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package runtime diff --git a/src/runtime/netpoll_epoll.go b/src/runtime/netpoll_epoll.go index 58f4fa87541..371ac59f8e2 100644 --- a/src/runtime/netpoll_epoll.go +++ b/src/runtime/netpoll_epoll.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 linux // +build linux package runtime diff --git a/src/runtime/netpoll_fake.go b/src/runtime/netpoll_fake.go index b2af3b89b2c..8366f289144 100644 --- a/src/runtime/netpoll_fake.go +++ b/src/runtime/netpoll_fake.go @@ -5,6 +5,7 @@ // Fake network poller for wasm/js. // Should never be used, because wasm/js network connections do not honor "SetNonblock". +//go:build js && wasm // +build js,wasm package runtime diff --git a/src/runtime/netpoll_kqueue.go b/src/runtime/netpoll_kqueue.go index 3bd93c1f208..80d1b0cf18a 100644 --- a/src/runtime/netpoll_kqueue.go +++ b/src/runtime/netpoll_kqueue.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package runtime diff --git a/src/runtime/netpoll_stub.go b/src/runtime/netpoll_stub.go index 3599f2d01b7..33ab8eba58c 100644 --- a/src/runtime/netpoll_stub.go +++ b/src/runtime/netpoll_stub.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 plan9 // +build plan9 package runtime diff --git a/src/runtime/norace_linux_test.go b/src/runtime/norace_linux_test.go index 3517a5ddbe7..94b7c7a4677 100644 --- a/src/runtime/norace_linux_test.go +++ b/src/runtime/norace_linux_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The file contains tests that cannot run under race detector for some reason. +//go:build !race // +build !race package runtime_test diff --git a/src/runtime/norace_test.go b/src/runtime/norace_test.go index e90128bb6d4..9ad5dde3829 100644 --- a/src/runtime/norace_test.go +++ b/src/runtime/norace_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The file contains tests that cannot run under race detector for some reason. +//go:build !race // +build !race package runtime_test diff --git a/src/runtime/os_aix.go b/src/runtime/os_aix.go index 303f0876deb..557b17cc75e 100644 --- a/src/runtime/os_aix.go +++ b/src/runtime/os_aix.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 aix // +build aix package runtime diff --git a/src/runtime/os_freebsd2.go b/src/runtime/os_freebsd2.go index 6947a05d041..fde6fbf1b14 100644 --- a/src/runtime/os_freebsd2.go +++ b/src/runtime/os_freebsd2.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 freebsd && !amd64 // +build freebsd,!amd64 package runtime diff --git a/src/runtime/os_freebsd_noauxv.go b/src/runtime/os_freebsd_noauxv.go index 01efb9b7c9c..8fe0cb6718f 100644 --- a/src/runtime/os_freebsd_noauxv.go +++ b/src/runtime/os_freebsd_noauxv.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build freebsd -// +build !arm +//go:build freebsd && !arm +// +build freebsd,!arm package runtime diff --git a/src/runtime/os_js.go b/src/runtime/os_js.go index 5b2c53795a2..52b64e76027 100644 --- a/src/runtime/os_js.go +++ b/src/runtime/os_js.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 js && wasm // +build js,wasm package runtime diff --git a/src/runtime/os_linux_arm64.go b/src/runtime/os_linux_arm64.go index c5fd7420488..5260f22f573 100644 --- a/src/runtime/os_linux_arm64.go +++ b/src/runtime/os_linux_arm64.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 arm64 // +build arm64 package runtime diff --git a/src/runtime/os_linux_be64.go b/src/runtime/os_linux_be64.go index 9860002ee41..806d02fee83 100644 --- a/src/runtime/os_linux_be64.go +++ b/src/runtime/os_linux_be64.go @@ -4,6 +4,7 @@ // The standard GNU/Linux sigset type on big-endian 64-bit machines. +//go:build linux && (ppc64 || s390x) // +build linux // +build ppc64 s390x diff --git a/src/runtime/os_linux_generic.go b/src/runtime/os_linux_generic.go index e1d0952ddf5..fe1973dbde6 100644 --- a/src/runtime/os_linux_generic.go +++ b/src/runtime/os_linux_generic.go @@ -2,13 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !mips -// +build !mipsle -// +build !mips64 -// +build !mips64le -// +build !s390x -// +build !ppc64 -// +build linux +//go:build !mips && !mipsle && !mips64 && !mips64le && !s390x && !ppc64 && linux +// +build !mips,!mipsle,!mips64,!mips64le,!s390x,!ppc64,linux package runtime diff --git a/src/runtime/os_linux_mips64x.go b/src/runtime/os_linux_mips64x.go index 815a83a04bc..bd76442dbd8 100644 --- a/src/runtime/os_linux_mips64x.go +++ b/src/runtime/os_linux_mips64x.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 linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le diff --git a/src/runtime/os_linux_mipsx.go b/src/runtime/os_linux_mipsx.go index 00fb02e4bf5..ef8b3f7d434 100644 --- a/src/runtime/os_linux_mipsx.go +++ b/src/runtime/os_linux_mipsx.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 linux && (mips || mipsle) // +build linux // +build mips mipsle diff --git a/src/runtime/os_linux_noauxv.go b/src/runtime/os_linux_noauxv.go index 895b4cd5f44..59b5aacaebc 100644 --- a/src/runtime/os_linux_noauxv.go +++ b/src/runtime/os_linux_noauxv.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux -// +build !arm,!arm64,!mips,!mipsle,!mips64,!mips64le,!s390x,!ppc64,!ppc64le +//go:build linux && !arm && !arm64 && !mips && !mipsle && !mips64 && !mips64le && !s390x && !ppc64 && !ppc64le +// +build linux,!arm,!arm64,!mips,!mipsle,!mips64,!mips64le,!s390x,!ppc64,!ppc64le package runtime diff --git a/src/runtime/os_linux_novdso.go b/src/runtime/os_linux_novdso.go index 155f415e71c..8104f63627f 100644 --- a/src/runtime/os_linux_novdso.go +++ b/src/runtime/os_linux_novdso.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux -// +build !386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le +//go:build linux && !386 && !amd64 && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le +// +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le package runtime diff --git a/src/runtime/os_linux_ppc64x.go b/src/runtime/os_linux_ppc64x.go index 3aedc23ef90..c093d2ec0f5 100644 --- a/src/runtime/os_linux_ppc64x.go +++ b/src/runtime/os_linux_ppc64x.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 linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le diff --git a/src/runtime/os_linux_x86.go b/src/runtime/os_linux_x86.go index d91fa1a0d18..5667774d82f 100644 --- a/src/runtime/os_linux_x86.go +++ b/src/runtime/os_linux_x86.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 linux && (386 || amd64) // +build linux // +build 386 amd64 diff --git a/src/runtime/os_nonopenbsd.go b/src/runtime/os_nonopenbsd.go index e65697bdb31..6134b6c02f2 100644 --- a/src/runtime/os_nonopenbsd.go +++ b/src/runtime/os_nonopenbsd.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 !openbsd // +build !openbsd package runtime diff --git a/src/runtime/os_only_solaris.go b/src/runtime/os_only_solaris.go index e2f5409354d..3829683c807 100644 --- a/src/runtime/os_only_solaris.go +++ b/src/runtime/os_only_solaris.go @@ -4,6 +4,7 @@ // Solaris code that doesn't also apply to illumos. +//go:build !illumos // +build !illumos package runtime diff --git a/src/runtime/os_openbsd_libc.go b/src/runtime/os_openbsd_libc.go index 2edb0358b07..3f43ade5588 100644 --- a/src/runtime/os_openbsd_libc.go +++ b/src/runtime/os_openbsd_libc.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/os_openbsd_syscall.go b/src/runtime/os_openbsd_syscall.go index 16ff2b8e255..6facf31593f 100644 --- a/src/runtime/os_openbsd_syscall.go +++ b/src/runtime/os_openbsd_syscall.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build openbsd,!amd64 -// +build openbsd,!arm64 +//go:build openbsd && !amd64 && openbsd && !arm64 +// +build openbsd,!amd64,openbsd,!arm64 package runtime diff --git a/src/runtime/os_openbsd_syscall1.go b/src/runtime/os_openbsd_syscall1.go index f37da04194e..0f3d5f0b73d 100644 --- a/src/runtime/os_openbsd_syscall1.go +++ b/src/runtime/os_openbsd_syscall1.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 openbsd && !amd64 && !arm64 // +build openbsd,!amd64,!arm64 package runtime diff --git a/src/runtime/os_openbsd_syscall2.go b/src/runtime/os_openbsd_syscall2.go index 81cfb085aa4..3b1707126bd 100644 --- a/src/runtime/os_openbsd_syscall2.go +++ b/src/runtime/os_openbsd_syscall2.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 openbsd && !amd64 && !arm64 // +build openbsd,!amd64,!arm64 package runtime diff --git a/src/runtime/panic32.go b/src/runtime/panic32.go index aea8401a37b..acbdd1ff458 100644 --- a/src/runtime/panic32.go +++ b/src/runtime/panic32.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 386 || arm || mips || mipsle // +build 386 arm mips mipsle package runtime diff --git a/src/runtime/pprof/mprof_test.go b/src/runtime/pprof/mprof_test.go index c11a45fd694..3ef40d3de7d 100644 --- a/src/runtime/pprof/mprof_test.go +++ b/src/runtime/pprof/mprof_test.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 !js // +build !js package pprof @@ -93,31 +94,31 @@ func TestMemoryProfiler(t *testing.T) { }{{ stk: []string{"runtime/pprof.allocatePersistent1K", "runtime/pprof.TestMemoryProfiler"}, legacy: fmt.Sprintf(`%v: %v \[%v: %v\] @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ -# 0x[0-9,a-f]+ runtime/pprof\.allocatePersistent1K\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test\.go:47 -# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test\.go:82 +# 0x[0-9,a-f]+ runtime/pprof\.allocatePersistent1K\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test\.go:48 +# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test\.go:83 `, 32*memoryProfilerRun, 1024*memoryProfilerRun, 32*memoryProfilerRun, 1024*memoryProfilerRun), }, { stk: []string{"runtime/pprof.allocateTransient1M", "runtime/pprof.TestMemoryProfiler"}, legacy: fmt.Sprintf(`0: 0 \[%v: %v\] @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ -# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient1M\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:24 -# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:79 +# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient1M\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:25 +# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:80 `, (1<<10)*memoryProfilerRun, (1<<20)*memoryProfilerRun), }, { stk: []string{"runtime/pprof.allocateTransient2M", "runtime/pprof.TestMemoryProfiler"}, legacy: fmt.Sprintf(`0: 0 \[%v: %v\] @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ -# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient2M\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:30 -# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:80 +# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient2M\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:31 +# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:81 `, memoryProfilerRun, (2<<20)*memoryProfilerRun), }, { stk: []string{"runtime/pprof.allocateTransient2MInline", "runtime/pprof.TestMemoryProfiler"}, legacy: fmt.Sprintf(`0: 0 \[%v: %v\] @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ -# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient2MInline\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:34 -# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:81 +# 0x[0-9,a-f]+ runtime/pprof\.allocateTransient2MInline\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:35 +# 0x[0-9,a-f]+ runtime/pprof\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:82 `, memoryProfilerRun, (2<<20)*memoryProfilerRun), }, { stk: []string{"runtime/pprof.allocateReflectTransient"}, legacy: fmt.Sprintf(`0: 0 \[%v: %v\] @( 0x[0-9,a-f]+)+ -# 0x[0-9,a-f]+ runtime/pprof\.allocateReflectTransient\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:55 +# 0x[0-9,a-f]+ runtime/pprof\.allocateReflectTransient\+0x[0-9,a-f]+ .*/runtime/pprof/mprof_test.go:56 `, memoryProfilerRun, (2<<20)*memoryProfilerRun), }} diff --git a/src/runtime/pprof/pprof_norusage.go b/src/runtime/pprof/pprof_norusage.go index 6fdcc6cc38d..e175dd380cf 100644 --- a/src/runtime/pprof/pprof_norusage.go +++ b/src/runtime/pprof/pprof_norusage.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 !darwin && !linux // +build !darwin,!linux package pprof diff --git a/src/runtime/pprof/pprof_rusage.go b/src/runtime/pprof/pprof_rusage.go index 79546738119..269f21bc2f9 100644 --- a/src/runtime/pprof/pprof_rusage.go +++ b/src/runtime/pprof/pprof_rusage.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 darwin || linux // +build darwin linux package pprof diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index 14321b09349..1b86dbff5b2 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.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 !js // +build !js package pprof diff --git a/src/runtime/preempt_nonwindows.go b/src/runtime/preempt_nonwindows.go index 3066a1521eb..365e86a611a 100644 --- a/src/runtime/preempt_nonwindows.go +++ b/src/runtime/preempt_nonwindows.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 runtime diff --git a/src/runtime/race.go b/src/runtime/race.go index 79fd21765d7..cc8c5db1bd2 100644 --- a/src/runtime/race.go +++ b/src/runtime/race.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 race // +build race package runtime diff --git a/src/runtime/race/output_test.go b/src/runtime/race/output_test.go index 17dc32013f3..4a959d9aba4 100644 --- a/src/runtime/race/output_test.go +++ b/src/runtime/race/output_test.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 race // +build race package race_test diff --git a/src/runtime/race/race.go b/src/runtime/race/race.go index d6a14b79e71..fe50900ec8b 100644 --- a/src/runtime/race/race.go +++ b/src/runtime/race/race.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 (race && linux && amd64) || (race && freebsd && amd64) || (race && netbsd && amd64) || (race && darwin && amd64) || (race && windows && amd64) || (race && linux && ppc64le) || (race && linux && arm64) || (race && darwin && arm64) // +build race,linux,amd64 race,freebsd,amd64 race,netbsd,amd64 race,darwin,amd64 race,windows,amd64 race,linux,ppc64le race,linux,arm64 race,darwin,arm64 package race diff --git a/src/runtime/race/race_linux_test.go b/src/runtime/race/race_linux_test.go index c00ce4d3dfc..9c0d48d6bda 100644 --- a/src/runtime/race/race_linux_test.go +++ b/src/runtime/race/race_linux_test.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 linux && race // +build linux,race package race_test diff --git a/src/runtime/race/race_test.go b/src/runtime/race/race_test.go index d433af6bd02..8c880b85700 100644 --- a/src/runtime/race/race_test.go +++ b/src/runtime/race/race_test.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 race // +build race // This program is used to verify the race detector diff --git a/src/runtime/race/race_unix_test.go b/src/runtime/race/race_unix_test.go index 84f0acece6e..acd6e47f982 100644 --- a/src/runtime/race/race_unix_test.go +++ b/src/runtime/race/race_unix_test.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 race && (darwin || freebsd || linux) // +build race // +build darwin freebsd linux diff --git a/src/runtime/race/race_windows_test.go b/src/runtime/race/race_windows_test.go index 307a1ea6c0d..e490d766dd0 100644 --- a/src/runtime/race/race_windows_test.go +++ b/src/runtime/race/race_windows_test.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 && race // +build windows,race package race_test diff --git a/src/runtime/race/sched_test.go b/src/runtime/race/sched_test.go index d6bb323cde9..e904ebd20d8 100644 --- a/src/runtime/race/sched_test.go +++ b/src/runtime/race/sched_test.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 race // +build race package race_test diff --git a/src/runtime/race/syso_test.go b/src/runtime/race/syso_test.go index db846c5d2ad..cbce5a8f184 100644 --- a/src/runtime/race/syso_test.go +++ b/src/runtime/race/syso_test.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 !android && !js && !ppc64le // +build !android,!js,!ppc64le // Note: we don't run on Android or ppc64 because if there is any non-race test diff --git a/src/runtime/race/timer_test.go b/src/runtime/race/timer_test.go index a6c34a8352e..f11f8456a0f 100644 --- a/src/runtime/race/timer_test.go +++ b/src/runtime/race/timer_test.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 race // +build race package race_test diff --git a/src/runtime/race0.go b/src/runtime/race0.go index 180f707b1a7..0e431b8103e 100644 --- a/src/runtime/race0.go +++ b/src/runtime/race0.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 !race // +build !race // Dummy race detection API, used when not built with -race. diff --git a/src/runtime/relax_stub.go b/src/runtime/relax_stub.go index 81ed1291b8b..5b92879c20b 100644 --- a/src/runtime/relax_stub.go +++ b/src/runtime/relax_stub.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 runtime diff --git a/src/runtime/runtime_mmap_test.go b/src/runtime/runtime_mmap_test.go index bb0b747606b..f71f8afa574 100644 --- a/src/runtime/runtime_mmap_test.go +++ b/src/runtime/runtime_mmap_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package runtime_test diff --git a/src/runtime/runtime_unix_test.go b/src/runtime/runtime_unix_test.go index b0cbbbe3e60..0251c676e6d 100644 --- a/src/runtime/runtime_unix_test.go +++ b/src/runtime/runtime_unix_test.go @@ -6,6 +6,7 @@ // We need a fast system call to provoke the race, // and Close(-1) is nearly universally fast. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || plan9 // +build aix darwin dragonfly freebsd linux netbsd openbsd plan9 package runtime_test diff --git a/src/runtime/semasleep_test.go b/src/runtime/semasleep_test.go index 9b371b07324..905e932b7d8 100644 --- a/src/runtime/semasleep_test.go +++ b/src/runtime/semasleep_test.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 !plan9 && !windows && !js // +build !plan9,!windows,!js package runtime_test diff --git a/src/runtime/sigaction.go b/src/runtime/sigaction.go index 3c888579d0e..76f37b1b535 100644 --- a/src/runtime/sigaction.go +++ b/src/runtime/sigaction.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 (linux && !amd64 && !arm64) || (freebsd && !amd64) // +build linux,!amd64,!arm64 freebsd,!amd64 package runtime diff --git a/src/runtime/signal_386.go b/src/runtime/signal_386.go index 065aff48d30..5824eaddb56 100644 --- a/src/runtime/signal_386.go +++ b/src/runtime/signal_386.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package runtime diff --git a/src/runtime/signal_aix_ppc64.go b/src/runtime/signal_aix_ppc64.go index c17563e2a5f..a0becd431eb 100644 --- a/src/runtime/signal_aix_ppc64.go +++ b/src/runtime/signal_aix_ppc64.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 aix // +build aix package runtime diff --git a/src/runtime/signal_amd64.go b/src/runtime/signal_amd64.go index 3eeb5e044ff..e45fbb4a87a 100644 --- a/src/runtime/signal_amd64.go +++ b/src/runtime/signal_amd64.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 amd64 && (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) // +build amd64 // +build darwin dragonfly freebsd linux netbsd openbsd solaris diff --git a/src/runtime/signal_arm.go b/src/runtime/signal_arm.go index 156d9d384c7..4d9c6224a29 100644 --- a/src/runtime/signal_arm.go +++ b/src/runtime/signal_arm.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package runtime diff --git a/src/runtime/signal_arm64.go b/src/runtime/signal_arm64.go index b559b939388..f04750084f4 100644 --- a/src/runtime/signal_arm64.go +++ b/src/runtime/signal_arm64.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 darwin || freebsd || linux || netbsd || openbsd // +build darwin freebsd linux netbsd openbsd package runtime diff --git a/src/runtime/signal_linux_mips64x.go b/src/runtime/signal_linux_mips64x.go index b608197d605..f0a75ac3ea5 100644 --- a/src/runtime/signal_linux_mips64x.go +++ b/src/runtime/signal_linux_mips64x.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 linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le diff --git a/src/runtime/signal_linux_mipsx.go b/src/runtime/signal_linux_mipsx.go index c88ac4d5217..f3969c5aac4 100644 --- a/src/runtime/signal_linux_mipsx.go +++ b/src/runtime/signal_linux_mipsx.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 linux && (mips || mipsle) // +build linux // +build mips mipsle diff --git a/src/runtime/signal_linux_ppc64x.go b/src/runtime/signal_linux_ppc64x.go index 97cb26d5877..d9d3e55ec20 100644 --- a/src/runtime/signal_linux_ppc64x.go +++ b/src/runtime/signal_linux_ppc64x.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 linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le diff --git a/src/runtime/signal_mips64x.go b/src/runtime/signal_mips64x.go index 2a347ff4cb8..1616b570278 100644 --- a/src/runtime/signal_mips64x.go +++ b/src/runtime/signal_mips64x.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 (linux || openbsd) && (mips64 || mips64le) // +build linux openbsd // +build mips64 mips64le diff --git a/src/runtime/signal_mipsx.go b/src/runtime/signal_mipsx.go index 8c29f59bd10..dcc7f1e9dd5 100644 --- a/src/runtime/signal_mipsx.go +++ b/src/runtime/signal_mipsx.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 linux && (mips || mipsle) // +build linux // +build mips mipsle diff --git a/src/runtime/signal_ppc64x.go b/src/runtime/signal_ppc64x.go index 5de93a330ac..f2225da9a17 100644 --- a/src/runtime/signal_ppc64x.go +++ b/src/runtime/signal_ppc64x.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 (aix || linux) && (ppc64 || ppc64le) // +build aix linux // +build ppc64 ppc64le diff --git a/src/runtime/signal_riscv64.go b/src/runtime/signal_riscv64.go index 93363a4746d..e6b1b14130e 100644 --- a/src/runtime/signal_riscv64.go +++ b/src/runtime/signal_riscv64.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 linux && riscv64 // +build linux,riscv64 package runtime diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 3f70707ab4e..f2e526973df 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package runtime diff --git a/src/runtime/signal_windows_test.go b/src/runtime/signal_windows_test.go index 33a9b92ee73..05bc6f8e71f 100644 --- a/src/runtime/signal_windows_test.go +++ b/src/runtime/signal_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package runtime_test diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index 28b9e26d0fd..a282c7aca77 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -28,6 +28,7 @@ // unnecessary rechecks of sig.mask, but it cannot lead to missed signals // nor deadlocks. +//go:build !plan9 // +build !plan9 package runtime diff --git a/src/runtime/sigqueue_note.go b/src/runtime/sigqueue_note.go index 16aeeb2ef0b..e23446bea47 100644 --- a/src/runtime/sigqueue_note.go +++ b/src/runtime/sigqueue_note.go @@ -7,8 +7,8 @@ // signal_recv thread. This file holds the non-Darwin implementations of // those functions. These functions will never be called. -// +build !darwin -// +build !plan9 +//go:build !darwin && !plan9 +// +build !darwin,!plan9 package runtime diff --git a/src/runtime/sigtab_linux_generic.go b/src/runtime/sigtab_linux_generic.go index 38d686544fd..dc1debddab3 100644 --- a/src/runtime/sigtab_linux_generic.go +++ b/src/runtime/sigtab_linux_generic.go @@ -2,11 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !mips -// +build !mipsle -// +build !mips64 -// +build !mips64le -// +build linux +//go:build !mips && !mipsle && !mips64 && !mips64le && linux +// +build !mips,!mipsle,!mips64,!mips64le,linux package runtime diff --git a/src/runtime/sigtab_linux_mipsx.go b/src/runtime/sigtab_linux_mipsx.go index 51ef470ce7a..af9c7e56eb9 100644 --- a/src/runtime/sigtab_linux_mipsx.go +++ b/src/runtime/sigtab_linux_mipsx.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 (mips || mipsle || mips64 || mips64le) && linux // +build mips mipsle mips64 mips64le // +build linux diff --git a/src/runtime/stubs2.go b/src/runtime/stubs2.go index 96096d236b8..525b324c816 100644 --- a/src/runtime/stubs2.go +++ b/src/runtime/stubs2.go @@ -2,13 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !aix -// +build !darwin -// +build !js -// +build !openbsd -// +build !plan9 -// +build !solaris -// +build !windows +//go:build !aix && !darwin && !js && !openbsd && !plan9 && !solaris && !windows +// +build !aix,!darwin,!js,!openbsd,!plan9,!solaris,!windows package runtime diff --git a/src/runtime/stubs3.go b/src/runtime/stubs3.go index 1885d320510..b895be4c707 100644 --- a/src/runtime/stubs3.go +++ b/src/runtime/stubs3.go @@ -2,12 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !aix -// +build !darwin -// +build !freebsd -// +build !openbsd -// +build !plan9 -// +build !solaris +//go:build !aix && !darwin && !freebsd && !openbsd && !plan9 && !solaris +// +build !aix,!darwin,!freebsd,!openbsd,!plan9,!solaris package runtime diff --git a/src/runtime/stubs_linux.go b/src/runtime/stubs_linux.go index e75fcf6c95c..ba267009ca1 100644 --- a/src/runtime/stubs_linux.go +++ b/src/runtime/stubs_linux.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 linux // +build linux package runtime diff --git a/src/runtime/stubs_mips64x.go b/src/runtime/stubs_mips64x.go index 652e7a9e34b..05a4d0d38d5 100644 --- a/src/runtime/stubs_mips64x.go +++ b/src/runtime/stubs_mips64x.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 mips64 || mips64le // +build mips64 mips64le package runtime diff --git a/src/runtime/stubs_mipsx.go b/src/runtime/stubs_mipsx.go index 707b295f7a5..9bffb35b67e 100644 --- a/src/runtime/stubs_mipsx.go +++ b/src/runtime/stubs_mipsx.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 mips || mipsle // +build mips mipsle package runtime diff --git a/src/runtime/stubs_nonlinux.go b/src/runtime/stubs_nonlinux.go index e1ea05cf0b1..f9b98595fc4 100644 --- a/src/runtime/stubs_nonlinux.go +++ b/src/runtime/stubs_nonlinux.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 !linux // +build !linux package runtime diff --git a/src/runtime/stubs_ppc64x.go b/src/runtime/stubs_ppc64x.go index 26f5bb20caa..0841b413fdb 100644 --- a/src/runtime/stubs_ppc64x.go +++ b/src/runtime/stubs_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package runtime diff --git a/src/runtime/sys_libc.go b/src/runtime/sys_libc.go index 996c0321050..99d073517b2 100644 --- a/src/runtime/sys_libc.go +++ b/src/runtime/sys_libc.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 darwin || (openbsd && amd64) || (openbsd && arm64) // +build darwin openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/sys_mips64x.go b/src/runtime/sys_mips64x.go index cb429c31476..842a4a7084f 100644 --- a/src/runtime/sys_mips64x.go +++ b/src/runtime/sys_mips64x.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 mips64 || mips64le // +build mips64 mips64le package runtime diff --git a/src/runtime/sys_mipsx.go b/src/runtime/sys_mipsx.go index 2819218d5f4..2038eb7d794 100644 --- a/src/runtime/sys_mipsx.go +++ b/src/runtime/sys_mipsx.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 mips || mipsle // +build mips mipsle package runtime diff --git a/src/runtime/sys_nonppc64x.go b/src/runtime/sys_nonppc64x.go index 440937498f7..66821b1f76b 100644 --- a/src/runtime/sys_nonppc64x.go +++ b/src/runtime/sys_nonppc64x.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 !ppc64 && !ppc64le // +build !ppc64,!ppc64le package runtime diff --git a/src/runtime/sys_openbsd.go b/src/runtime/sys_openbsd.go index fcddf4d6a56..362fa777ef9 100644 --- a/src/runtime/sys_openbsd.go +++ b/src/runtime/sys_openbsd.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/sys_openbsd1.go b/src/runtime/sys_openbsd1.go index 44c7871ceb1..43e0058985f 100644 --- a/src/runtime/sys_openbsd1.go +++ b/src/runtime/sys_openbsd1.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/sys_openbsd2.go b/src/runtime/sys_openbsd2.go index 33032596c3f..73157043bea 100644 --- a/src/runtime/sys_openbsd2.go +++ b/src/runtime/sys_openbsd2.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/sys_openbsd3.go b/src/runtime/sys_openbsd3.go index 4d4c88e3acc..751c00c2b31 100644 --- a/src/runtime/sys_openbsd3.go +++ b/src/runtime/sys_openbsd3.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package runtime diff --git a/src/runtime/sys_ppc64x.go b/src/runtime/sys_ppc64x.go index 796f27c4e35..69bd99fa09e 100644 --- a/src/runtime/sys_ppc64x.go +++ b/src/runtime/sys_ppc64x.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 ppc64 || ppc64le // +build ppc64 ppc64le package runtime diff --git a/src/runtime/sys_x86.go b/src/runtime/sys_x86.go index 8f21585d28b..0866e3140e0 100644 --- a/src/runtime/sys_x86.go +++ b/src/runtime/sys_x86.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 amd64 || 386 // +build amd64 386 package runtime diff --git a/src/runtime/time_fake.go b/src/runtime/time_fake.go index c64d2994a90..1238744ebf6 100644 --- a/src/runtime/time_fake.go +++ b/src/runtime/time_fake.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build faketime -// +build !windows +//go:build faketime && !windows +// +build faketime,!windows // Faketime isn't currently supported on Windows. This would require: // diff --git a/src/runtime/time_nofake.go b/src/runtime/time_nofake.go index 1912a94e873..13bf1c2d4fb 100644 --- a/src/runtime/time_nofake.go +++ b/src/runtime/time_nofake.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 !faketime // +build !faketime package runtime diff --git a/src/runtime/timeasm.go b/src/runtime/timeasm.go index 82cf63edffd..fe38a086fc7 100644 --- a/src/runtime/timeasm.go +++ b/src/runtime/timeasm.go @@ -4,6 +4,7 @@ // Declarations for operating systems implementing time.now directly in assembly. +//go:build windows // +build windows package runtime diff --git a/src/runtime/timestub.go b/src/runtime/timestub.go index 459bf8e5435..2ef8d4665fa 100644 --- a/src/runtime/timestub.go +++ b/src/runtime/timestub.go @@ -5,6 +5,7 @@ // Declarations for operating systems implementing time.now // indirectly, in terms of walltime and nanotime assembly. +//go:build !windows // +build !windows package runtime diff --git a/src/runtime/timestub2.go b/src/runtime/timestub2.go index 68777ee4a90..53b10885afc 100644 --- a/src/runtime/timestub2.go +++ b/src/runtime/timestub2.go @@ -2,12 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !aix -// +build !darwin -// +build !freebsd -// +build !openbsd -// +build !solaris -// +build !windows +//go:build !aix && !darwin && !freebsd && !openbsd && !solaris && !windows +// +build !aix,!darwin,!freebsd,!openbsd,!solaris,!windows package runtime diff --git a/src/runtime/vdso_elf32.go b/src/runtime/vdso_elf32.go index 2720f33eede..456173b0f51 100644 --- a/src/runtime/vdso_elf32.go +++ b/src/runtime/vdso_elf32.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 linux && (386 || arm) // +build linux // +build 386 arm diff --git a/src/runtime/vdso_elf64.go b/src/runtime/vdso_elf64.go index 6ded9d621a6..9923bd46971 100644 --- a/src/runtime/vdso_elf64.go +++ b/src/runtime/vdso_elf64.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 linux && (amd64 || arm64 || mips64 || mips64le || ppc64 || ppc64le) // +build linux // +build amd64 arm64 mips64 mips64le ppc64 ppc64le diff --git a/src/runtime/vdso_freebsd.go b/src/runtime/vdso_freebsd.go index 122cc8b128a..74b2f1435a1 100644 --- a/src/runtime/vdso_freebsd.go +++ b/src/runtime/vdso_freebsd.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 freebsd // +build freebsd package runtime diff --git a/src/runtime/vdso_freebsd_x86.go b/src/runtime/vdso_freebsd_x86.go index 1fa5d80dcc0..23a5a8c3227 100644 --- a/src/runtime/vdso_freebsd_x86.go +++ b/src/runtime/vdso_freebsd_x86.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 freebsd && (386 || amd64) // +build freebsd // +build 386 amd64 diff --git a/src/runtime/vdso_in_none.go b/src/runtime/vdso_in_none.go index 7f4019c0d62..c66fbf82166 100644 --- a/src/runtime/vdso_in_none.go +++ b/src/runtime/vdso_in_none.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 (linux && !386 && !amd64 && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le) || !linux // +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le !linux package runtime diff --git a/src/runtime/vdso_linux.go b/src/runtime/vdso_linux.go index 6e2942498dd..ae211f96b1b 100644 --- a/src/runtime/vdso_linux.go +++ b/src/runtime/vdso_linux.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 linux && (386 || amd64 || arm || arm64 || mips64 || mips64le || ppc64 || ppc64le) // +build linux // +build 386 amd64 arm arm64 mips64 mips64le ppc64 ppc64le diff --git a/src/runtime/vdso_linux_mips64x.go b/src/runtime/vdso_linux_mips64x.go index 3a0f9476124..395ddbba69a 100644 --- a/src/runtime/vdso_linux_mips64x.go +++ b/src/runtime/vdso_linux_mips64x.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 linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le diff --git a/src/runtime/vdso_linux_ppc64x.go b/src/runtime/vdso_linux_ppc64x.go index f30946e4c5b..b741dbfcdc5 100644 --- a/src/runtime/vdso_linux_ppc64x.go +++ b/src/runtime/vdso_linux_ppc64x.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 linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le diff --git a/src/runtime/vlrt.go b/src/runtime/vlrt.go index 996c0611fd1..cf631bdcca7 100644 --- a/src/runtime/vlrt.go +++ b/src/runtime/vlrt.go @@ -23,6 +23,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +//go:build arm || 386 || mips || mipsle // +build arm 386 mips mipsle package runtime diff --git a/src/runtime/wincallback.go b/src/runtime/wincallback.go index cf3327c6fe7..56f0674f4e2 100644 --- a/src/runtime/wincallback.go +++ b/src/runtime/wincallback.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 ignore // +build ignore // Generate Windows callback assembly file. diff --git a/src/runtime/write_err.go b/src/runtime/write_err.go index 6b1467b1c48..a4656fd7281 100644 --- a/src/runtime/write_err.go +++ b/src/runtime/write_err.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 !android // +build !android package runtime diff --git a/src/sort/genzfunc.go b/src/sort/genzfunc.go index e7eb5737371..ed04e33568f 100644 --- a/src/sort/genzfunc.go +++ b/src/sort/genzfunc.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 ignore // +build ignore // This program is run via "go generate" (via a directive in sort.go) diff --git a/src/sort/slice_go113.go b/src/sort/slice_go113.go index bf24db714a3..53542dbd1a9 100644 --- a/src/sort/slice_go113.go +++ b/src/sort/slice_go113.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 go1.13 // +build go1.13 package sort diff --git a/src/sort/slice_go14.go b/src/sort/slice_go14.go index 3bf5cbc00bf..5d5949f3cad 100644 --- a/src/sort/slice_go14.go +++ b/src/sort/slice_go14.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 !go1.8 // +build !go1.8 package sort diff --git a/src/sort/slice_go18.go b/src/sort/slice_go18.go index e1766040a78..1538477bc5d 100644 --- a/src/sort/slice_go18.go +++ b/src/sort/slice_go18.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 go1.8 && !go1.13 // +build go1.8,!go1.13 package sort diff --git a/src/strconv/bytealg.go b/src/strconv/bytealg.go index 7f66f2a8bbc..9780c28ef33 100644 --- a/src/strconv/bytealg.go +++ b/src/strconv/bytealg.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 !compiler_bootstrap // +build !compiler_bootstrap package strconv diff --git a/src/strconv/bytealg_bootstrap.go b/src/strconv/bytealg_bootstrap.go index a3a547d1b63..875a0eb147a 100644 --- a/src/strconv/bytealg_bootstrap.go +++ b/src/strconv/bytealg_bootstrap.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 compiler_bootstrap // +build compiler_bootstrap package strconv diff --git a/src/strconv/makeisprint.go b/src/strconv/makeisprint.go index 0e6e90a6c66..79678341d46 100644 --- a/src/strconv/makeisprint.go +++ b/src/strconv/makeisprint.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 ignore // +build ignore // diff --git a/src/sync/pool_test.go b/src/sync/pool_test.go index ad98350b2bf..65666daab48 100644 --- a/src/sync/pool_test.go +++ b/src/sync/pool_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // Pool is no-op under race detector, so all these tests do not work. +//go:build !race // +build !race package sync_test diff --git a/src/sync/runtime2.go b/src/sync/runtime2.go index f10c4e8e0ef..c4b44893f0e 100644 --- a/src/sync/runtime2.go +++ b/src/sync/runtime2.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 !goexperiment.staticlockranking // +build !goexperiment.staticlockranking package sync diff --git a/src/sync/runtime2_lockrank.go b/src/sync/runtime2_lockrank.go index aaa1c276261..e91fdb6c1ff 100644 --- a/src/sync/runtime2_lockrank.go +++ b/src/sync/runtime2_lockrank.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 goexperiment.staticlockranking // +build goexperiment.staticlockranking package sync diff --git a/src/syscall/bpf_bsd.go b/src/syscall/bpf_bsd.go index f67ee6064bf..452d4cf14b6 100644 --- a/src/syscall/bpf_bsd.go +++ b/src/syscall/bpf_bsd.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 dragonfly || freebsd || netbsd || openbsd // +build dragonfly freebsd netbsd openbsd // Berkeley packet filter for BSD variants diff --git a/src/syscall/creds_test.go b/src/syscall/creds_test.go index 524689ae2d2..463033d5580 100644 --- a/src/syscall/creds_test.go +++ b/src/syscall/creds_test.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 linux // +build linux package syscall_test diff --git a/src/syscall/dirent.go b/src/syscall/dirent.go index fab123d4a7d..9e1222e81c6 100644 --- a/src/syscall/dirent.go +++ b/src/syscall/dirent.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package syscall diff --git a/src/syscall/dirent_test.go b/src/syscall/dirent_test.go index 7dac98ff4b9..8ed3caa9d48 100644 --- a/src/syscall/dirent_test.go +++ b/src/syscall/dirent_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package syscall_test diff --git a/src/syscall/endian_big.go b/src/syscall/endian_big.go index 3c26005ab5f..dc0947fa6e8 100644 --- a/src/syscall/endian_big.go +++ b/src/syscall/endian_big.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 ppc64 || s390x || mips || mips64 // +build ppc64 s390x mips mips64 package syscall diff --git a/src/syscall/endian_little.go b/src/syscall/endian_little.go index 43b081d6408..a894445f73c 100644 --- a/src/syscall/endian_little.go +++ b/src/syscall/endian_little.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 386 || amd64 || arm || arm64 || ppc64le || mips64le || mipsle || riscv64 || wasm // +build 386 amd64 arm arm64 ppc64le mips64le mipsle riscv64 wasm package syscall diff --git a/src/syscall/env_unix.go b/src/syscall/env_unix.go index a4bb28cc455..022ef6ed734 100644 --- a/src/syscall/env_unix.go +++ b/src/syscall/env_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || plan9 // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris plan9 // Unix environment variables. diff --git a/src/syscall/exec_aix_test.go b/src/syscall/exec_aix_test.go index 22b752cf271..17c7ac0664a 100644 --- a/src/syscall/exec_aix_test.go +++ b/src/syscall/exec_aix_test.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 aix // +build aix package syscall diff --git a/src/syscall/exec_bsd.go b/src/syscall/exec_bsd.go index 940a81b58ee..9c1fbbaeab0 100644 --- a/src/syscall/exec_bsd.go +++ b/src/syscall/exec_bsd.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 dragonfly || freebsd || netbsd || (openbsd && !amd64 && !arm64) // +build dragonfly freebsd netbsd openbsd,!amd64,!arm64 package syscall diff --git a/src/syscall/exec_libc.go b/src/syscall/exec_libc.go index 37228583252..3c8e87d32f0 100644 --- a/src/syscall/exec_libc.go +++ b/src/syscall/exec_libc.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 aix || solaris // +build aix solaris // This file handles forkAndExecInChild function for OS using libc syscall like AIX or Solaris. diff --git a/src/syscall/exec_libc2.go b/src/syscall/exec_libc2.go index 45d3f85baff..507eff8ab30 100644 --- a/src/syscall/exec_libc2.go +++ b/src/syscall/exec_libc2.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 darwin || (openbsd && amd64) || (openbsd && arm64) // +build darwin openbsd,amd64 openbsd,arm64 package syscall diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index b6acad96ea4..b0099cb4b0c 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.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 linux // +build linux package syscall diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go index ac3a5754ae3..7d89eaae63a 100644 --- a/src/syscall/exec_linux_test.go +++ b/src/syscall/exec_linux_test.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 linux // +build linux package syscall_test diff --git a/src/syscall/exec_solaris_test.go b/src/syscall/exec_solaris_test.go index 6b8f1ad3837..f54fc8385d5 100644 --- a/src/syscall/exec_solaris_test.go +++ b/src/syscall/exec_solaris_test.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 solaris // +build solaris package syscall diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go index 1f49c78ef9d..1f38de22b28 100644 --- a/src/syscall/exec_unix.go +++ b/src/syscall/exec_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // Fork, exec, wait, etc. diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go index d6b6f51fa6e..10bad5ac468 100644 --- a/src/syscall/exec_unix_test.go +++ b/src/syscall/exec_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package syscall_test diff --git a/src/syscall/export_unix_test.go b/src/syscall/export_unix_test.go index 4c3d0f6d2ad..2d2c67673d7 100644 --- a/src/syscall/export_unix_test.go +++ b/src/syscall/export_unix_test.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 dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package syscall diff --git a/src/syscall/flock.go b/src/syscall/flock.go index 568efca7d49..3b43b6aeded 100644 --- a/src/syscall/flock.go +++ b/src/syscall/flock.go @@ -1,3 +1,4 @@ +//go:build linux || freebsd || openbsd || netbsd || dragonfly // +build linux freebsd openbsd netbsd dragonfly // Copyright 2014 The Go Authors. All rights reserved. diff --git a/src/syscall/flock_linux_32bit.go b/src/syscall/flock_linux_32bit.go index e11aed6ed1a..2f3277497cd 100644 --- a/src/syscall/flock_linux_32bit.go +++ b/src/syscall/flock_linux_32bit.go @@ -5,6 +5,7 @@ // If you change the build tags here, see // internal/syscall/unix/fcntl_linux_32bit.go. +//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) // +build linux,386 linux,arm linux,mips linux,mipsle package syscall diff --git a/src/syscall/forkpipe.go b/src/syscall/forkpipe.go index d9999cb8b86..c7ddcf26ab7 100644 --- a/src/syscall/forkpipe.go +++ b/src/syscall/forkpipe.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 aix || darwin || dragonfly || solaris // +build aix darwin dragonfly solaris package syscall diff --git a/src/syscall/forkpipe2.go b/src/syscall/forkpipe2.go index c9a0c4996e3..cd98779ac9e 100644 --- a/src/syscall/forkpipe2.go +++ b/src/syscall/forkpipe2.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 freebsd || netbsd || openbsd // +build freebsd netbsd openbsd package syscall diff --git a/src/syscall/fs_js.go b/src/syscall/fs_js.go index 673feea77f2..01705162014 100644 --- a/src/syscall/fs_js.go +++ b/src/syscall/fs_js.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 js && wasm // +build js,wasm package syscall diff --git a/src/syscall/getdirentries_test.go b/src/syscall/getdirentries_test.go index 66bb8acba2e..936c8a163a1 100644 --- a/src/syscall/getdirentries_test.go +++ b/src/syscall/getdirentries_test.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 darwin || freebsd || netbsd || openbsd // +build darwin freebsd netbsd openbsd package syscall_test diff --git a/src/syscall/mkasm.go b/src/syscall/mkasm.go index e53d14bed10..39461145e99 100644 --- a/src/syscall/mkasm.go +++ b/src/syscall/mkasm.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 ignore // +build ignore // mkasm.go generates assembly trampolines to call library routines from Go. diff --git a/src/syscall/mkpost.go b/src/syscall/mkpost.go index ef89128310b..94e8d92eff8 100644 --- a/src/syscall/mkpost.go +++ b/src/syscall/mkpost.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 ignore // +build ignore // mkpost processes the output of cgo -godefs to diff --git a/src/syscall/mksyscall_windows.go b/src/syscall/mksyscall_windows.go index 240254b2c76..d8e8a713c55 100644 --- a/src/syscall/mksyscall_windows.go +++ b/src/syscall/mksyscall_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 ignore // +build ignore // mksyscall_windows wraps golang.org/x/sys/windows/mkwinsyscall. diff --git a/src/syscall/mmap_unix_test.go b/src/syscall/mmap_unix_test.go index d0b3644b59c..e3909f1afb0 100644 --- a/src/syscall/mmap_unix_test.go +++ b/src/syscall/mmap_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build aix darwin dragonfly freebsd linux netbsd openbsd package syscall_test diff --git a/src/syscall/msan.go b/src/syscall/msan.go index baaad6df984..89fb75f03c9 100644 --- a/src/syscall/msan.go +++ b/src/syscall/msan.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 msan // +build msan package syscall diff --git a/src/syscall/msan0.go b/src/syscall/msan0.go index ff10be9d25d..85097025a0b 100644 --- a/src/syscall/msan0.go +++ b/src/syscall/msan0.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 !msan // +build !msan package syscall diff --git a/src/syscall/net_js.go b/src/syscall/net_js.go index 25f171bda87..ed462025bbc 100644 --- a/src/syscall/net_js.go +++ b/src/syscall/net_js.go @@ -5,6 +5,7 @@ // js/wasm uses fake networking directly implemented in the net package. // This file only exists to make the compiler happy. +//go:build js && wasm // +build js,wasm package syscall diff --git a/src/syscall/ptrace_darwin.go b/src/syscall/ptrace_darwin.go index a873d826b8a..b968c7c7f3a 100644 --- a/src/syscall/ptrace_darwin.go +++ b/src/syscall/ptrace_darwin.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 !ios // +build !ios package syscall diff --git a/src/syscall/route_bsd.go b/src/syscall/route_bsd.go index b364eeaba5d..e9321a4e645 100644 --- a/src/syscall/route_bsd.go +++ b/src/syscall/route_bsd.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package syscall diff --git a/src/syscall/route_freebsd_32bit.go b/src/syscall/route_freebsd_32bit.go index aed8682237a..412833a37cb 100644 --- a/src/syscall/route_freebsd_32bit.go +++ b/src/syscall/route_freebsd_32bit.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 (freebsd && 386) || (freebsd && arm) // +build freebsd,386 freebsd,arm package syscall diff --git a/src/syscall/route_freebsd_64bit.go b/src/syscall/route_freebsd_64bit.go index e70ba3df896..5300bed4717 100644 --- a/src/syscall/route_freebsd_64bit.go +++ b/src/syscall/route_freebsd_64bit.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 (freebsd && amd64) || (freebsd && arm64) // +build freebsd,amd64 freebsd,arm64 package syscall diff --git a/src/syscall/setuidgid_32_linux.go b/src/syscall/setuidgid_32_linux.go index b0b7f61d221..64897fe43c6 100644 --- a/src/syscall/setuidgid_32_linux.go +++ b/src/syscall/setuidgid_32_linux.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 linux && (386 || arm) // +build linux // +build 386 arm diff --git a/src/syscall/setuidgid_linux.go b/src/syscall/setuidgid_linux.go index 38c83c92f97..3b36f66fa26 100644 --- a/src/syscall/setuidgid_linux.go +++ b/src/syscall/setuidgid_linux.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux -// +build !386,!arm +//go:build linux && !386 && !arm +// +build linux,!386,!arm package syscall diff --git a/src/syscall/sockcmsg_unix.go b/src/syscall/sockcmsg_unix.go index 1ff97a5ae1b..99913b9a88b 100644 --- a/src/syscall/sockcmsg_unix.go +++ b/src/syscall/sockcmsg_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // Socket control messages diff --git a/src/syscall/sockcmsg_unix_other.go b/src/syscall/sockcmsg_unix_other.go index 40f03142a63..bd8dcfa34cf 100644 --- a/src/syscall/sockcmsg_unix_other.go +++ b/src/syscall/sockcmsg_unix_other.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 aix || darwin || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin freebsd linux netbsd openbsd solaris package syscall diff --git a/src/syscall/syscall_bsd.go b/src/syscall/syscall_bsd.go index 1c7ec588bcf..595e705856e 100644 --- a/src/syscall/syscall_bsd.go +++ b/src/syscall/syscall_bsd.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 darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd // BSD system call wrappers shared by *BSD based systems diff --git a/src/syscall/syscall_bsd_test.go b/src/syscall/syscall_bsd_test.go index f2bc3f51470..2d8a8cbfe61 100644 --- a/src/syscall/syscall_bsd_test.go +++ b/src/syscall/syscall_bsd_test.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 darwin || dragonfly || freebsd || openbsd // +build darwin dragonfly freebsd openbsd package syscall_test diff --git a/src/syscall/syscall_dup2_linux.go b/src/syscall/syscall_dup2_linux.go index f03a9231127..351a96edc18 100644 --- a/src/syscall/syscall_dup2_linux.go +++ b/src/syscall/syscall_dup2_linux.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 !android && (386 || amd64 || arm || mips || mipsle || mips64 || mips64le || ppc64 || ppc64le || s390x) // +build !android // +build 386 amd64 arm mips mipsle mips64 mips64le ppc64 ppc64le s390x diff --git a/src/syscall/syscall_dup3_linux.go b/src/syscall/syscall_dup3_linux.go index 1ebdcb20a2e..66ec67b0ab4 100644 --- a/src/syscall/syscall_dup3_linux.go +++ b/src/syscall/syscall_dup3_linux.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 android || arm64 || riscv64 // +build android arm64 riscv64 package syscall diff --git a/src/syscall/syscall_freebsd_test.go b/src/syscall/syscall_freebsd_test.go index 3ccfe5d463f..89c7959d0c4 100644 --- a/src/syscall/syscall_freebsd_test.go +++ b/src/syscall/syscall_freebsd_test.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 freebsd // +build freebsd package syscall_test diff --git a/src/syscall/syscall_illumos.go b/src/syscall/syscall_illumos.go index d70a436d13e..ef95fe58f7c 100644 --- a/src/syscall/syscall_illumos.go +++ b/src/syscall/syscall_illumos.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 illumos // +build illumos // Illumos system calls not present on Solaris. diff --git a/src/syscall/syscall_js.go b/src/syscall/syscall_js.go index 0ab8c3fba4c..c17c6fcdcf3 100644 --- a/src/syscall/syscall_js.go +++ b/src/syscall/syscall_js.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 js && wasm // +build js,wasm package syscall diff --git a/src/syscall/syscall_linux_mips64x.go b/src/syscall/syscall_linux_mips64x.go index ab25b7be6f1..dd51f3d00a5 100644 --- a/src/syscall/syscall_linux_mips64x.go +++ b/src/syscall/syscall_linux_mips64x.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 linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le diff --git a/src/syscall/syscall_linux_mipsx.go b/src/syscall/syscall_linux_mipsx.go index 377946fc92d..7894bdd4653 100644 --- a/src/syscall/syscall_linux_mipsx.go +++ b/src/syscall/syscall_linux_mipsx.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 linux && (mips || mipsle) // +build linux // +build mips mipsle diff --git a/src/syscall/syscall_linux_ppc64x.go b/src/syscall/syscall_linux_ppc64x.go index 45bf667407f..495ae29757c 100644 --- a/src/syscall/syscall_linux_ppc64x.go +++ b/src/syscall/syscall_linux_ppc64x.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 linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le diff --git a/src/syscall/syscall_openbsd1.go b/src/syscall/syscall_openbsd1.go index 2c7d0f8c904..0d6761d49ea 100644 --- a/src/syscall/syscall_openbsd1.go +++ b/src/syscall/syscall_openbsd1.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 openbsd && !amd64 && !arm64 // +build openbsd,!amd64,!arm64 package syscall diff --git a/src/syscall/syscall_openbsd_libc.go b/src/syscall/syscall_openbsd_libc.go index 042615bf2ad..610c66fd349 100644 --- a/src/syscall/syscall_openbsd_libc.go +++ b/src/syscall/syscall_openbsd_libc.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 (openbsd && amd64) || (openbsd && arm64) // +build openbsd,amd64 openbsd,arm64 package syscall diff --git a/src/syscall/syscall_ptrace_test.go b/src/syscall/syscall_ptrace_test.go index 6b7f54dcfd5..45729d9e8e9 100644 --- a/src/syscall/syscall_ptrace_test.go +++ b/src/syscall/syscall_ptrace_test.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package syscall_test diff --git a/src/syscall/syscall_unix.go b/src/syscall/syscall_unix.go index 786ad34170d..40fc8b8a302 100644 --- a/src/syscall/syscall_unix.go +++ b/src/syscall/syscall_unix.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package syscall diff --git a/src/syscall/syscall_unix_test.go b/src/syscall/syscall_unix_test.go index 7e6a8c9043e..a05fff51361 100644 --- a/src/syscall/syscall_unix_test.go +++ b/src/syscall/syscall_unix_test.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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package syscall_test diff --git a/src/syscall/tables_js.go b/src/syscall/tables_js.go index a7c4f8c890f..64d958415d8 100644 --- a/src/syscall/tables_js.go +++ b/src/syscall/tables_js.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 js && wasm // +build js,wasm package syscall diff --git a/src/syscall/time_fake.go b/src/syscall/time_fake.go index 5dec57a25ac..cf88aeb921a 100644 --- a/src/syscall/time_fake.go +++ b/src/syscall/time_fake.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 faketime // +build faketime package syscall diff --git a/src/syscall/time_nofake.go b/src/syscall/time_nofake.go index c94cef86862..5eaa2daabd3 100644 --- a/src/syscall/time_nofake.go +++ b/src/syscall/time_nofake.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 !faketime // +build !faketime package syscall diff --git a/src/syscall/timestruct.go b/src/syscall/timestruct.go index bca51df08df..e4f3d50f56b 100644 --- a/src/syscall/timestruct.go +++ b/src/syscall/timestruct.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package syscall diff --git a/src/syscall/types_aix.go b/src/syscall/types_aix.go index cbc47cc6c1b..6588d690eab 100644 --- a/src/syscall/types_aix.go +++ b/src/syscall/types_aix.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 ignore // +build ignore /* diff --git a/src/syscall/types_darwin.go b/src/syscall/types_darwin.go index 7b3a9d23353..c2a32c0782e 100644 --- a/src/syscall/types_darwin.go +++ b/src/syscall/types_darwin.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 ignore // +build ignore /* diff --git a/src/syscall/types_dragonfly.go b/src/syscall/types_dragonfly.go index 53bc12403b2..9f8d5bc3ddc 100644 --- a/src/syscall/types_dragonfly.go +++ b/src/syscall/types_dragonfly.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 ignore // +build ignore /* diff --git a/src/syscall/types_freebsd.go b/src/syscall/types_freebsd.go index f6860211211..d7414117036 100644 --- a/src/syscall/types_freebsd.go +++ b/src/syscall/types_freebsd.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 ignore // +build ignore /* diff --git a/src/syscall/types_illumos_amd64.go b/src/syscall/types_illumos_amd64.go index abb282f3e4f..254e3e7cfed 100644 --- a/src/syscall/types_illumos_amd64.go +++ b/src/syscall/types_illumos_amd64.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 illumos // +build illumos // Illumos consts not present on Solaris. These are added manually rather than diff --git a/src/syscall/types_linux.go b/src/syscall/types_linux.go index 9de32d9c013..bf76be978bc 100644 --- a/src/syscall/types_linux.go +++ b/src/syscall/types_linux.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 ignore // +build ignore /* diff --git a/src/syscall/types_netbsd.go b/src/syscall/types_netbsd.go index 30ab2dc8458..0bd25ea3c95 100644 --- a/src/syscall/types_netbsd.go +++ b/src/syscall/types_netbsd.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 ignore // +build ignore /* diff --git a/src/syscall/types_openbsd.go b/src/syscall/types_openbsd.go index 922864815bc..8b41cdca230 100644 --- a/src/syscall/types_openbsd.go +++ b/src/syscall/types_openbsd.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 ignore // +build ignore /* diff --git a/src/syscall/types_solaris.go b/src/syscall/types_solaris.go index 76a74508d2b..179f7914817 100644 --- a/src/syscall/types_solaris.go +++ b/src/syscall/types_solaris.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 ignore // +build ignore /* diff --git a/src/syscall/zerrors_darwin_amd64.go b/src/syscall/zerrors_darwin_amd64.go index 58799fbde79..0b9897284c4 100644 --- a/src/syscall/zerrors_darwin_amd64.go +++ b/src/syscall/zerrors_darwin_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && darwin // +build amd64,darwin package syscall diff --git a/src/syscall/zerrors_darwin_arm64.go b/src/syscall/zerrors_darwin_arm64.go index 8b433616ee6..5f210fd1c40 100644 --- a/src/syscall/zerrors_darwin_arm64.go +++ b/src/syscall/zerrors_darwin_arm64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build arm64 && darwin // +build arm64,darwin package syscall diff --git a/src/syscall/zerrors_dragonfly_amd64.go b/src/syscall/zerrors_dragonfly_amd64.go index 3434a85d34f..b572f44a6b9 100644 --- a/src/syscall/zerrors_dragonfly_amd64.go +++ b/src/syscall/zerrors_dragonfly_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && dragonfly // +build amd64,dragonfly package syscall diff --git a/src/syscall/zerrors_freebsd_386.go b/src/syscall/zerrors_freebsd_386.go index 85786a5b4e5..aec26ad7785 100644 --- a/src/syscall/zerrors_freebsd_386.go +++ b/src/syscall/zerrors_freebsd_386.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m32 _const.go +//go:build 386 && freebsd // +build 386,freebsd package syscall diff --git a/src/syscall/zerrors_freebsd_amd64.go b/src/syscall/zerrors_freebsd_amd64.go index b3ebf3d4744..d6d13e41558 100644 --- a/src/syscall/zerrors_freebsd_amd64.go +++ b/src/syscall/zerrors_freebsd_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && freebsd // +build amd64,freebsd package syscall diff --git a/src/syscall/zerrors_freebsd_arm.go b/src/syscall/zerrors_freebsd_arm.go index 29eabb1d2d9..15c714fad81 100644 --- a/src/syscall/zerrors_freebsd_arm.go +++ b/src/syscall/zerrors_freebsd_arm.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go +//go:build arm && freebsd // +build arm,freebsd package syscall diff --git a/src/syscall/zerrors_freebsd_arm64.go b/src/syscall/zerrors_freebsd_arm64.go index 82ee1584789..b20ce7d8231 100644 --- a/src/syscall/zerrors_freebsd_arm64.go +++ b/src/syscall/zerrors_freebsd_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; DO NOT EDIT. +//go:build freebsd && arm64 // +build freebsd,arm64 // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/src/syscall/zerrors_linux_386.go b/src/syscall/zerrors_linux_386.go index 53a442d1080..fb64932ad62 100644 --- a/src/syscall/zerrors_linux_386.go +++ b/src/syscall/zerrors_linux_386.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m32 _const.go +//go:build 386 && linux // +build 386,linux package syscall diff --git a/src/syscall/zerrors_linux_amd64.go b/src/syscall/zerrors_linux_amd64.go index 0b4c60dd4c4..3a92bcdbb46 100644 --- a/src/syscall/zerrors_linux_amd64.go +++ b/src/syscall/zerrors_linux_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && linux // +build amd64,linux package syscall diff --git a/src/syscall/zerrors_linux_arm.go b/src/syscall/zerrors_linux_arm.go index 9a8d9e85795..e013d8e7fd6 100644 --- a/src/syscall/zerrors_linux_arm.go +++ b/src/syscall/zerrors_linux_arm.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go +//go:build arm && linux // +build arm,linux package syscall diff --git a/src/syscall/zerrors_linux_arm64.go b/src/syscall/zerrors_linux_arm64.go index f0caf552b2f..1a4d33e3fd5 100644 --- a/src/syscall/zerrors_linux_arm64.go +++ b/src/syscall/zerrors_linux_arm64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go +//go:build arm64 && linux // +build arm64,linux package syscall diff --git a/src/syscall/zerrors_linux_ppc64.go b/src/syscall/zerrors_linux_ppc64.go index f064731ae5f..1dda43be70f 100644 --- a/src/syscall/zerrors_linux_ppc64.go +++ b/src/syscall/zerrors_linux_ppc64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build ppc64 && linux // +build ppc64,linux package syscall diff --git a/src/syscall/zerrors_linux_ppc64le.go b/src/syscall/zerrors_linux_ppc64le.go index 41e21a510e8..6d56f1c9981 100644 --- a/src/syscall/zerrors_linux_ppc64le.go +++ b/src/syscall/zerrors_linux_ppc64le.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build ppc64le && linux // +build ppc64le,linux package syscall diff --git a/src/syscall/zerrors_netbsd_386.go b/src/syscall/zerrors_netbsd_386.go index bf1e4a74c3d..6a58946a4a8 100644 --- a/src/syscall/zerrors_netbsd_386.go +++ b/src/syscall/zerrors_netbsd_386.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m32 _const.go +//go:build 386 && netbsd // +build 386,netbsd package syscall diff --git a/src/syscall/zerrors_netbsd_amd64.go b/src/syscall/zerrors_netbsd_amd64.go index 247e78e6c60..f5c5c2f49c8 100644 --- a/src/syscall/zerrors_netbsd_amd64.go +++ b/src/syscall/zerrors_netbsd_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && netbsd // +build amd64,netbsd package syscall diff --git a/src/syscall/zerrors_netbsd_arm.go b/src/syscall/zerrors_netbsd_arm.go index f23cd8693f9..c9d4579b416 100644 --- a/src/syscall/zerrors_netbsd_arm.go +++ b/src/syscall/zerrors_netbsd_arm.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -marm _const.go +//go:build arm && netbsd // +build arm,netbsd package syscall diff --git a/src/syscall/zerrors_netbsd_arm64.go b/src/syscall/zerrors_netbsd_arm64.go index 6f6453f6ee4..e35bff7f3ee 100644 --- a/src/syscall/zerrors_netbsd_arm64.go +++ b/src/syscall/zerrors_netbsd_arm64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build arm64 && netbsd // +build arm64,netbsd package syscall diff --git a/src/syscall/zerrors_openbsd_386.go b/src/syscall/zerrors_openbsd_386.go index 7985abe3f01..04d1b3f1775 100644 --- a/src/syscall/zerrors_openbsd_386.go +++ b/src/syscall/zerrors_openbsd_386.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m32 _const.go +//go:build 386 && openbsd // +build 386,openbsd package syscall diff --git a/src/syscall/zerrors_openbsd_amd64.go b/src/syscall/zerrors_openbsd_amd64.go index 9c4ff2955fd..923a3a47c5e 100644 --- a/src/syscall/zerrors_openbsd_amd64.go +++ b/src/syscall/zerrors_openbsd_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && openbsd // +build amd64,openbsd package syscall diff --git a/src/syscall/zerrors_openbsd_arm.go b/src/syscall/zerrors_openbsd_arm.go index 493a8389f2b..89a4e6d89a5 100644 --- a/src/syscall/zerrors_openbsd_arm.go +++ b/src/syscall/zerrors_openbsd_arm.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go +//go:build arm && openbsd // +build arm,openbsd package syscall diff --git a/src/syscall/zerrors_solaris_amd64.go b/src/syscall/zerrors_solaris_amd64.go index eba401544af..b7dee696029 100644 --- a/src/syscall/zerrors_solaris_amd64.go +++ b/src/syscall/zerrors_solaris_amd64.go @@ -4,6 +4,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go +//go:build amd64 && solaris // +build amd64,solaris package syscall diff --git a/src/syscall/zsyscall_aix_ppc64.go b/src/syscall/zsyscall_aix_ppc64.go index 20625c1a3e0..134ae41165b 100644 --- a/src/syscall/zsyscall_aix_ppc64.go +++ b/src/syscall/zsyscall_aix_ppc64.go @@ -1,6 +1,7 @@ // mksyscall_libc.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; DO NOT EDIT. +//go:build aix && ppc64 // +build aix,ppc64 package syscall diff --git a/src/syscall/zsyscall_darwin_amd64.go b/src/syscall/zsyscall_darwin_amd64.go index 4f2cdf861e2..13dfacdba2e 100644 --- a/src/syscall/zsyscall_darwin_amd64.go +++ b/src/syscall/zsyscall_darwin_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -darwin -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build darwin && amd64 // +build darwin,amd64 package syscall diff --git a/src/syscall/zsyscall_darwin_arm64.go b/src/syscall/zsyscall_darwin_arm64.go index 0d8598d8165..79576eedf7a 100644 --- a/src/syscall/zsyscall_darwin_arm64.go +++ b/src/syscall/zsyscall_darwin_arm64.go @@ -1,6 +1,7 @@ // mksyscall.pl -darwin -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go // Code generated by the command above; DO NOT EDIT. +//go:build darwin && arm64 // +build darwin,arm64 package syscall diff --git a/src/syscall/zsyscall_dragonfly_amd64.go b/src/syscall/zsyscall_dragonfly_amd64.go index 578b5a3e9e4..4799d1dcb01 100644 --- a/src/syscall/zsyscall_dragonfly_amd64.go +++ b/src/syscall/zsyscall_dragonfly_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build dragonfly && amd64 // +build dragonfly,amd64 package syscall diff --git a/src/syscall/zsyscall_freebsd_386.go b/src/syscall/zsyscall_freebsd_386.go index ddc265f1901..7137d66f0b2 100644 --- a/src/syscall/zsyscall_freebsd_386.go +++ b/src/syscall/zsyscall_freebsd_386.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go // Code generated by the command above; DO NOT EDIT. +//go:build freebsd && 386 // +build freebsd,386 package syscall diff --git a/src/syscall/zsyscall_freebsd_amd64.go b/src/syscall/zsyscall_freebsd_amd64.go index a0f79522b98..d721dafde28 100644 --- a/src/syscall/zsyscall_freebsd_amd64.go +++ b/src/syscall/zsyscall_freebsd_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build freebsd && amd64 // +build freebsd,amd64 package syscall diff --git a/src/syscall/zsyscall_freebsd_arm.go b/src/syscall/zsyscall_freebsd_arm.go index 2cd23d3db63..d9dbea921a1 100644 --- a/src/syscall/zsyscall_freebsd_arm.go +++ b/src/syscall/zsyscall_freebsd_arm.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go // Code generated by the command above; DO NOT EDIT. +//go:build freebsd && arm // +build freebsd,arm package syscall diff --git a/src/syscall/zsyscall_freebsd_arm64.go b/src/syscall/zsyscall_freebsd_arm64.go index 1b177383c21..a24f0115e2c 100644 --- a/src/syscall/zsyscall_freebsd_arm64.go +++ b/src/syscall/zsyscall_freebsd_arm64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go // Code generated by the command above; DO NOT EDIT. +//go:build freebsd && arm64 // +build freebsd,arm64 package syscall diff --git a/src/syscall/zsyscall_linux_386.go b/src/syscall/zsyscall_linux_386.go index 5a749ff3f37..ac822d6f7a4 100644 --- a/src/syscall/zsyscall_linux_386.go +++ b/src/syscall/zsyscall_linux_386.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && 386 // +build linux,386 package syscall diff --git a/src/syscall/zsyscall_linux_amd64.go b/src/syscall/zsyscall_linux_amd64.go index 34b624c1d49..ed37fa8deca 100644 --- a/src/syscall/zsyscall_linux_amd64.go +++ b/src/syscall/zsyscall_linux_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && amd64 // +build linux,amd64 package syscall diff --git a/src/syscall/zsyscall_linux_arm.go b/src/syscall/zsyscall_linux_arm.go index 4d133766f7e..213aaf3bac4 100644 --- a/src/syscall/zsyscall_linux_arm.go +++ b/src/syscall/zsyscall_linux_arm.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && arm // +build linux,arm package syscall diff --git a/src/syscall/zsyscall_linux_arm64.go b/src/syscall/zsyscall_linux_arm64.go index e7f7b7e3f8c..e2f9c0fd9b0 100644 --- a/src/syscall/zsyscall_linux_arm64.go +++ b/src/syscall/zsyscall_linux_arm64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && arm64 // +build linux,arm64 package syscall diff --git a/src/syscall/zsyscall_linux_mips.go b/src/syscall/zsyscall_linux_mips.go index a8522dc5711..617c2f54663 100644 --- a/src/syscall/zsyscall_linux_mips.go +++ b/src/syscall/zsyscall_linux_mips.go @@ -1,6 +1,7 @@ // mksyscall.pl -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && mips // +build linux,mips package syscall diff --git a/src/syscall/zsyscall_linux_mips64.go b/src/syscall/zsyscall_linux_mips64.go index 1219fcc6cb0..793d4b98846 100644 --- a/src/syscall/zsyscall_linux_mips64.go +++ b/src/syscall/zsyscall_linux_mips64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && mips64 // +build linux,mips64 package syscall diff --git a/src/syscall/zsyscall_linux_mips64le.go b/src/syscall/zsyscall_linux_mips64le.go index c3737bf3cfb..54e1760bda6 100644 --- a/src/syscall/zsyscall_linux_mips64le.go +++ b/src/syscall/zsyscall_linux_mips64le.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && mips64le // +build linux,mips64le package syscall diff --git a/src/syscall/zsyscall_linux_mipsle.go b/src/syscall/zsyscall_linux_mipsle.go index 5006f4a4099..ba7e2118c04 100644 --- a/src/syscall/zsyscall_linux_mipsle.go +++ b/src/syscall/zsyscall_linux_mipsle.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && mipsle // +build linux,mipsle package syscall diff --git a/src/syscall/zsyscall_linux_ppc64.go b/src/syscall/zsyscall_linux_ppc64.go index 323be988beb..c3437722e02 100644 --- a/src/syscall/zsyscall_linux_ppc64.go +++ b/src/syscall/zsyscall_linux_ppc64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && ppc64 // +build linux,ppc64 package syscall diff --git a/src/syscall/zsyscall_linux_ppc64le.go b/src/syscall/zsyscall_linux_ppc64le.go index 99aea6b559a..acc34a76d2b 100644 --- a/src/syscall/zsyscall_linux_ppc64le.go +++ b/src/syscall/zsyscall_linux_ppc64le.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && ppc64le // +build linux,ppc64le package syscall diff --git a/src/syscall/zsyscall_linux_riscv64.go b/src/syscall/zsyscall_linux_riscv64.go index afa89459441..d662d780db9 100644 --- a/src/syscall/zsyscall_linux_riscv64.go +++ b/src/syscall/zsyscall_linux_riscv64.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && riscv64 // +build linux,riscv64 package syscall diff --git a/src/syscall/zsyscall_linux_s390x.go b/src/syscall/zsyscall_linux_s390x.go index 5717206f289..20f8c61366c 100644 --- a/src/syscall/zsyscall_linux_s390x.go +++ b/src/syscall/zsyscall_linux_s390x.go @@ -1,6 +1,7 @@ // mksyscall.pl -tags linux,s390x syscall_linux.go syscall_linux_s390x.go // Code generated by the command above; DO NOT EDIT. +//go:build linux && s390x // +build linux,s390x package syscall diff --git a/src/syscall/zsyscall_netbsd_386.go b/src/syscall/zsyscall_netbsd_386.go index 7e0210081e8..07ff5fba5f6 100644 --- a/src/syscall/zsyscall_netbsd_386.go +++ b/src/syscall/zsyscall_netbsd_386.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go // Code generated by the command above; DO NOT EDIT. +//go:build netbsd && 386 // +build netbsd,386 package syscall diff --git a/src/syscall/zsyscall_netbsd_amd64.go b/src/syscall/zsyscall_netbsd_amd64.go index e9ee790501f..ffb4e059a4b 100644 --- a/src/syscall/zsyscall_netbsd_amd64.go +++ b/src/syscall/zsyscall_netbsd_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build netbsd && amd64 // +build netbsd,amd64 package syscall diff --git a/src/syscall/zsyscall_netbsd_arm.go b/src/syscall/zsyscall_netbsd_arm.go index 37438b020b4..37df77e5e8c 100644 --- a/src/syscall/zsyscall_netbsd_arm.go +++ b/src/syscall/zsyscall_netbsd_arm.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go // Code generated by the command above; DO NOT EDIT. +//go:build netbsd && arm // +build netbsd,arm package syscall diff --git a/src/syscall/zsyscall_netbsd_arm64.go b/src/syscall/zsyscall_netbsd_arm64.go index 758f3982288..c5eb57a2269 100644 --- a/src/syscall/zsyscall_netbsd_arm64.go +++ b/src/syscall/zsyscall_netbsd_arm64.go @@ -1,6 +1,7 @@ // mksyscall.pl -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go // Code generated by the command above; DO NOT EDIT. +//go:build netbsd && arm64 // +build netbsd,arm64 package syscall diff --git a/src/syscall/zsyscall_openbsd_386.go b/src/syscall/zsyscall_openbsd_386.go index decd169f0dc..7d4c4d342ab 100644 --- a/src/syscall/zsyscall_openbsd_386.go +++ b/src/syscall/zsyscall_openbsd_386.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go // Code generated by the command above; DO NOT EDIT. +//go:build openbsd && 386 // +build openbsd,386 package syscall diff --git a/src/syscall/zsyscall_openbsd_amd64.go b/src/syscall/zsyscall_openbsd_amd64.go index 733050ad1d8..b4698b79e22 100644 --- a/src/syscall/zsyscall_openbsd_amd64.go +++ b/src/syscall/zsyscall_openbsd_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -openbsd -libc -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_libc.go syscall_openbsd_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build openbsd && amd64 // +build openbsd,amd64 package syscall diff --git a/src/syscall/zsyscall_openbsd_arm.go b/src/syscall/zsyscall_openbsd_arm.go index dce0a540e62..31425b35588 100644 --- a/src/syscall/zsyscall_openbsd_arm.go +++ b/src/syscall/zsyscall_openbsd_arm.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go // Code generated by the command above; DO NOT EDIT. +//go:build openbsd && arm // +build openbsd,arm package syscall diff --git a/src/syscall/zsyscall_openbsd_arm64.go b/src/syscall/zsyscall_openbsd_arm64.go index 2093eb74e57..de6db1e3fa4 100644 --- a/src/syscall/zsyscall_openbsd_arm64.go +++ b/src/syscall/zsyscall_openbsd_arm64.go @@ -1,6 +1,7 @@ // mksyscall.pl -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_libc.go syscall_openbsd_arm64.go // Code generated by the command above; DO NOT EDIT. +//go:build openbsd && arm64 // +build openbsd,arm64 package syscall diff --git a/src/syscall/zsyscall_openbsd_mips64.go b/src/syscall/zsyscall_openbsd_mips64.go index ded05686c47..70fd1474fd3 100644 --- a/src/syscall/zsyscall_openbsd_mips64.go +++ b/src/syscall/zsyscall_openbsd_mips64.go @@ -1,6 +1,7 @@ // mksyscall.pl -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64x.go // Code generated by the command above; DO NOT EDIT. +//go:build openbsd && mips64 // +build openbsd,mips64 package syscall diff --git a/src/syscall/zsyscall_plan9_386.go b/src/syscall/zsyscall_plan9_386.go index 998c6c555e4..8b7727b3435 100644 --- a/src/syscall/zsyscall_plan9_386.go +++ b/src/syscall/zsyscall_plan9_386.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -plan9 -tags plan9,386 syscall_plan9.go // Code generated by the command above; DO NOT EDIT. +//go:build plan9 && 386 // +build plan9,386 package syscall diff --git a/src/syscall/zsyscall_plan9_amd64.go b/src/syscall/zsyscall_plan9_amd64.go index 02a28294ea3..bed9108ea6e 100644 --- a/src/syscall/zsyscall_plan9_amd64.go +++ b/src/syscall/zsyscall_plan9_amd64.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -plan9 -tags plan9,amd64 syscall_plan9.go // Code generated by the command above; DO NOT EDIT. +//go:build plan9 && amd64 // +build plan9,amd64 package syscall diff --git a/src/syscall/zsyscall_plan9_arm.go b/src/syscall/zsyscall_plan9_arm.go index 449823976dd..7bbcf9b4b79 100644 --- a/src/syscall/zsyscall_plan9_arm.go +++ b/src/syscall/zsyscall_plan9_arm.go @@ -1,6 +1,7 @@ // mksyscall.pl -l32 -plan9 -tags plan9,arm syscall_plan9.go // Code generated by the command above; DO NOT EDIT. +//go:build plan9 && arm // +build plan9,arm package syscall diff --git a/src/syscall/zsyscall_solaris_amd64.go b/src/syscall/zsyscall_solaris_amd64.go index 446ebfc503d..9b37dc09506 100644 --- a/src/syscall/zsyscall_solaris_amd64.go +++ b/src/syscall/zsyscall_solaris_amd64.go @@ -1,6 +1,7 @@ // mksyscall_libc.pl -solaris -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go // Code generated by the command above; DO NOT EDIT. +//go:build solaris && amd64 // +build solaris,amd64 package syscall diff --git a/src/syscall/zsysnum_darwin_amd64.go b/src/syscall/zsysnum_darwin_amd64.go index a2331bee8a8..f66f7d2715f 100644 --- a/src/syscall/zsysnum_darwin_amd64.go +++ b/src/syscall/zsysnum_darwin_amd64.go @@ -1,6 +1,7 @@ // mksysnum_darwin.pl /usr/include/sys/syscall.h // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && darwin // +build amd64,darwin package syscall diff --git a/src/syscall/zsysnum_darwin_arm64.go b/src/syscall/zsysnum_darwin_arm64.go index 95487179450..6fa146368af 100644 --- a/src/syscall/zsysnum_darwin_arm64.go +++ b/src/syscall/zsysnum_darwin_arm64.go @@ -1,6 +1,7 @@ // mksysnum_darwin.pl /usr/include/sys/syscall.h // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && darwin // +build arm64,darwin package syscall diff --git a/src/syscall/zsysnum_dragonfly_amd64.go b/src/syscall/zsysnum_dragonfly_amd64.go index 9ce11f5899f..855188f045c 100644 --- a/src/syscall/zsysnum_dragonfly_amd64.go +++ b/src/syscall/zsysnum_dragonfly_amd64.go @@ -1,6 +1,7 @@ // mksysnum_dragonfly.pl // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && dragonfly // +build amd64,dragonfly package syscall diff --git a/src/syscall/zsysnum_freebsd_386.go b/src/syscall/zsysnum_freebsd_386.go index bb6e9d7ac33..1ed7e3ee8d3 100644 --- a/src/syscall/zsysnum_freebsd_386.go +++ b/src/syscall/zsysnum_freebsd_386.go @@ -1,6 +1,7 @@ // mksysnum_freebsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build 386 && freebsd // +build 386,freebsd package syscall diff --git a/src/syscall/zsysnum_freebsd_amd64.go b/src/syscall/zsysnum_freebsd_amd64.go index f5d81abc51e..d72dbc944a1 100644 --- a/src/syscall/zsysnum_freebsd_amd64.go +++ b/src/syscall/zsysnum_freebsd_amd64.go @@ -1,6 +1,7 @@ // mksysnum_freebsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && freebsd // +build amd64,freebsd package syscall diff --git a/src/syscall/zsysnum_freebsd_arm.go b/src/syscall/zsysnum_freebsd_arm.go index 006b49c2450..4f4dc4db795 100644 --- a/src/syscall/zsysnum_freebsd_arm.go +++ b/src/syscall/zsysnum_freebsd_arm.go @@ -1,6 +1,7 @@ // mksysnum_freebsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm && freebsd // +build arm,freebsd package syscall diff --git a/src/syscall/zsysnum_freebsd_arm64.go b/src/syscall/zsysnum_freebsd_arm64.go index 0ce3d05cf22..ab1a05258e7 100644 --- a/src/syscall/zsysnum_freebsd_arm64.go +++ b/src/syscall/zsysnum_freebsd_arm64.go @@ -1,6 +1,7 @@ // mksysnum_freebsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && freebsd // +build arm64,freebsd package syscall diff --git a/src/syscall/zsysnum_linux_386.go b/src/syscall/zsysnum_linux_386.go index 6bcd22185ee..792f43550e9 100644 --- a/src/syscall/zsysnum_linux_386.go +++ b/src/syscall/zsysnum_linux_386.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl /usr/include/asm/unistd_32.h // Code generated by the command above; DO NOT EDIT. +//go:build 386 && linux // +build 386,linux package syscall diff --git a/src/syscall/zsysnum_linux_amd64.go b/src/syscall/zsysnum_linux_amd64.go index 70ca68639f6..9ea18d61113 100644 --- a/src/syscall/zsysnum_linux_amd64.go +++ b/src/syscall/zsysnum_linux_amd64.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl /usr/include/asm/unistd_64.h // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && linux // +build amd64,linux package syscall diff --git a/src/syscall/zsysnum_linux_arm.go b/src/syscall/zsysnum_linux_arm.go index 39ddc6536ba..ccae9c15e32 100644 --- a/src/syscall/zsysnum_linux_arm.go +++ b/src/syscall/zsysnum_linux_arm.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm && linux // +build arm,linux package syscall diff --git a/src/syscall/zsysnum_linux_arm64.go b/src/syscall/zsysnum_linux_arm64.go index 22a88b4dfec..17c54a2c833 100644 --- a/src/syscall/zsysnum_linux_arm64.go +++ b/src/syscall/zsysnum_linux_arm64.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl /usr/include/asm-generic/unistd.h // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && linux // +build arm64,linux package syscall diff --git a/src/syscall/zsysnum_linux_ppc64.go b/src/syscall/zsysnum_linux_ppc64.go index 5882a7c058f..a0d37ff1f27 100644 --- a/src/syscall/zsysnum_linux_ppc64.go +++ b/src/syscall/zsysnum_linux_ppc64.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl /usr/include/asm/unistd.h // Code generated by the command above; DO NOT EDIT. +//go:build ppc64 && linux // +build ppc64,linux package syscall diff --git a/src/syscall/zsysnum_linux_ppc64le.go b/src/syscall/zsysnum_linux_ppc64le.go index 4fb3f6cd29b..f8f82d20432 100644 --- a/src/syscall/zsysnum_linux_ppc64le.go +++ b/src/syscall/zsysnum_linux_ppc64le.go @@ -1,6 +1,7 @@ // mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h // Code generated by the command above; DO NOT EDIT. +//go:build ppc64le && linux // +build ppc64le,linux package syscall diff --git a/src/syscall/zsysnum_netbsd_386.go b/src/syscall/zsysnum_netbsd_386.go index 514d1f8cfd3..4ff8d803416 100644 --- a/src/syscall/zsysnum_netbsd_386.go +++ b/src/syscall/zsysnum_netbsd_386.go @@ -1,6 +1,7 @@ // mksysnum_netbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build 386 && netbsd // +build 386,netbsd package syscall diff --git a/src/syscall/zsysnum_netbsd_amd64.go b/src/syscall/zsysnum_netbsd_amd64.go index db05c03ecda..929da076042 100644 --- a/src/syscall/zsysnum_netbsd_amd64.go +++ b/src/syscall/zsysnum_netbsd_amd64.go @@ -1,6 +1,7 @@ // mksysnum_netbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && netbsd // +build amd64,netbsd package syscall diff --git a/src/syscall/zsysnum_netbsd_arm.go b/src/syscall/zsysnum_netbsd_arm.go index 9a10a4383a6..998238518bf 100644 --- a/src/syscall/zsysnum_netbsd_arm.go +++ b/src/syscall/zsysnum_netbsd_arm.go @@ -1,6 +1,7 @@ // mksysnum_netbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm && netbsd // +build arm,netbsd package syscall diff --git a/src/syscall/zsysnum_netbsd_arm64.go b/src/syscall/zsysnum_netbsd_arm64.go index 31e13bf3b63..b3f5034390a 100644 --- a/src/syscall/zsysnum_netbsd_arm64.go +++ b/src/syscall/zsysnum_netbsd_arm64.go @@ -1,6 +1,7 @@ // mksysnum_netbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && netbsd // +build arm64,netbsd package syscall diff --git a/src/syscall/zsysnum_openbsd_386.go b/src/syscall/zsysnum_openbsd_386.go index 39b9c78288e..b289886d6c6 100644 --- a/src/syscall/zsysnum_openbsd_386.go +++ b/src/syscall/zsysnum_openbsd_386.go @@ -1,6 +1,7 @@ // mksysnum_openbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build 386 && openbsd // +build 386,openbsd package syscall diff --git a/src/syscall/zsysnum_openbsd_amd64.go b/src/syscall/zsysnum_openbsd_amd64.go index e176c4e23e5..8cf2b68dcd3 100644 --- a/src/syscall/zsysnum_openbsd_amd64.go +++ b/src/syscall/zsysnum_openbsd_amd64.go @@ -1,6 +1,7 @@ // mksysnum_openbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && openbsd // +build amd64,openbsd package syscall diff --git a/src/syscall/zsysnum_openbsd_arm.go b/src/syscall/zsysnum_openbsd_arm.go index 96bbdb09f56..cc33773a058 100644 --- a/src/syscall/zsysnum_openbsd_arm.go +++ b/src/syscall/zsysnum_openbsd_arm.go @@ -1,6 +1,7 @@ // mksysnum_openbsd.pl // Code generated by the command above; DO NOT EDIT. +//go:build arm && openbsd // +build arm,openbsd package syscall diff --git a/src/syscall/zsysnum_solaris_amd64.go b/src/syscall/zsysnum_solaris_amd64.go index be198f899b1..23c9c715b52 100644 --- a/src/syscall/zsysnum_solaris_amd64.go +++ b/src/syscall/zsysnum_solaris_amd64.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 amd64 && solaris // +build amd64,solaris package syscall diff --git a/src/syscall/ztypes_darwin_amd64.go b/src/syscall/ztypes_darwin_amd64.go index da56f0da22b..8feacc47ab5 100644 --- a/src/syscall/ztypes_darwin_amd64.go +++ b/src/syscall/ztypes_darwin_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_darwin.go +//go:build amd64 && darwin // +build amd64,darwin package syscall diff --git a/src/syscall/ztypes_darwin_arm64.go b/src/syscall/ztypes_darwin_arm64.go index 82685ff6591..8079d22429b 100644 --- a/src/syscall/ztypes_darwin_arm64.go +++ b/src/syscall/ztypes_darwin_arm64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_darwin.go +//go:build arm64 && darwin // +build arm64,darwin package syscall diff --git a/src/syscall/ztypes_dragonfly_amd64.go b/src/syscall/ztypes_dragonfly_amd64.go index e9e811f7764..a51e0038bb9 100644 --- a/src/syscall/ztypes_dragonfly_amd64.go +++ b/src/syscall/ztypes_dragonfly_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_dragonfly.go +//go:build amd64 && dragonfly // +build amd64,dragonfly package syscall diff --git a/src/syscall/ztypes_freebsd_386.go b/src/syscall/ztypes_freebsd_386.go index 27d82dea102..17397268838 100644 --- a/src/syscall/ztypes_freebsd_386.go +++ b/src/syscall/ztypes_freebsd_386.go @@ -1,6 +1,7 @@ // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs types_freebsd.go | go run mkpost.go +//go:build 386 && freebsd // +build 386,freebsd package syscall diff --git a/src/syscall/ztypes_freebsd_amd64.go b/src/syscall/ztypes_freebsd_amd64.go index 8abfbb45d69..0457d8e9959 100644 --- a/src/syscall/ztypes_freebsd_amd64.go +++ b/src/syscall/ztypes_freebsd_amd64.go @@ -1,6 +1,7 @@ // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs types_freebsd.go | go run mkpost.go +//go:build amd64 && freebsd // +build amd64,freebsd package syscall diff --git a/src/syscall/ztypes_freebsd_arm.go b/src/syscall/ztypes_freebsd_arm.go index ff552a6a63f..29c8380d898 100644 --- a/src/syscall/ztypes_freebsd_arm.go +++ b/src/syscall/ztypes_freebsd_arm.go @@ -1,6 +1,7 @@ // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -fsigned-char types_freebsd.go +//go:build arm && freebsd // +build arm,freebsd package syscall diff --git a/src/syscall/ztypes_freebsd_arm64.go b/src/syscall/ztypes_freebsd_arm64.go index 6d56fc85cff..6472db00809 100644 --- a/src/syscall/ztypes_freebsd_arm64.go +++ b/src/syscall/ztypes_freebsd_arm64.go @@ -1,6 +1,7 @@ // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs types_freebsd.go | go run mkpost.go +//go:build arm64 && freebsd // +build arm64,freebsd package syscall diff --git a/src/syscall/ztypes_linux_386.go b/src/syscall/ztypes_linux_386.go index 0252620f48c..251a0c0b4ad 100644 --- a/src/syscall/ztypes_linux_386.go +++ b/src/syscall/ztypes_linux_386.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go +//go:build 386 && linux // +build 386,linux package syscall diff --git a/src/syscall/ztypes_linux_amd64.go b/src/syscall/ztypes_linux_amd64.go index 1fb0ee566f1..34c953fc8bf 100644 --- a/src/syscall/ztypes_linux_amd64.go +++ b/src/syscall/ztypes_linux_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go +//go:build amd64 && linux // +build amd64,linux package syscall diff --git a/src/syscall/ztypes_linux_arm.go b/src/syscall/ztypes_linux_arm.go index a88b577bede..4de656b491e 100644 --- a/src/syscall/ztypes_linux_arm.go +++ b/src/syscall/ztypes_linux_arm.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go +//go:build arm && linux // +build arm,linux package syscall diff --git a/src/syscall/ztypes_linux_arm64.go b/src/syscall/ztypes_linux_arm64.go index f63391cdadc..bed9cb08515 100644 --- a/src/syscall/ztypes_linux_arm64.go +++ b/src/syscall/ztypes_linux_arm64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -fsigned-char types_linux.go +//go:build arm64 && linux // +build arm64,linux package syscall diff --git a/src/syscall/ztypes_linux_ppc64.go b/src/syscall/ztypes_linux_ppc64.go index 8b6be21e2ea..355533fb27c 100644 --- a/src/syscall/ztypes_linux_ppc64.go +++ b/src/syscall/ztypes_linux_ppc64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go +//go:build ppc64 && linux // +build ppc64,linux package syscall diff --git a/src/syscall/ztypes_linux_ppc64le.go b/src/syscall/ztypes_linux_ppc64le.go index a9c3ee26266..94e12c742c8 100644 --- a/src/syscall/ztypes_linux_ppc64le.go +++ b/src/syscall/ztypes_linux_ppc64le.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go +//go:build ppc64le && linux // +build ppc64le,linux package syscall diff --git a/src/syscall/ztypes_netbsd_386.go b/src/syscall/ztypes_netbsd_386.go index 737abb87c76..321460f45aa 100644 --- a/src/syscall/ztypes_netbsd_386.go +++ b/src/syscall/ztypes_netbsd_386.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_netbsd.go +//go:build 386 && netbsd // +build 386,netbsd package syscall diff --git a/src/syscall/ztypes_netbsd_amd64.go b/src/syscall/ztypes_netbsd_amd64.go index cf059f79ffe..370d7172634 100644 --- a/src/syscall/ztypes_netbsd_amd64.go +++ b/src/syscall/ztypes_netbsd_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_netbsd.go +//go:build amd64 && netbsd // +build amd64,netbsd package syscall diff --git a/src/syscall/ztypes_netbsd_arm.go b/src/syscall/ztypes_netbsd_arm.go index c532b3a7af5..557c6345339 100644 --- a/src/syscall/ztypes_netbsd_arm.go +++ b/src/syscall/ztypes_netbsd_arm.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_netbsd.go +//go:build arm && netbsd // +build arm,netbsd package syscall diff --git a/src/syscall/ztypes_netbsd_arm64.go b/src/syscall/ztypes_netbsd_arm64.go index 6d7f9edf34c..19f36903412 100644 --- a/src/syscall/ztypes_netbsd_arm64.go +++ b/src/syscall/ztypes_netbsd_arm64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_netbsd.go +//go:build arm64 && netbsd // +build arm64,netbsd package syscall diff --git a/src/syscall/ztypes_openbsd_386.go b/src/syscall/ztypes_openbsd_386.go index c2a03ebdd80..222c6c7e465 100644 --- a/src/syscall/ztypes_openbsd_386.go +++ b/src/syscall/ztypes_openbsd_386.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_openbsd.go +//go:build 386 && openbsd // +build 386,openbsd package syscall diff --git a/src/syscall/ztypes_openbsd_amd64.go b/src/syscall/ztypes_openbsd_amd64.go index 1a659ba2fea..644ee9b3dfb 100644 --- a/src/syscall/ztypes_openbsd_amd64.go +++ b/src/syscall/ztypes_openbsd_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_openbsd.go +//go:build amd64 && openbsd // +build amd64,openbsd package syscall diff --git a/src/syscall/ztypes_solaris_amd64.go b/src/syscall/ztypes_solaris_amd64.go index f846666fff2..64e16b49435 100644 --- a/src/syscall/ztypes_solaris_amd64.go +++ b/src/syscall/ztypes_solaris_amd64.go @@ -1,6 +1,7 @@ // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_solaris.go +//go:build amd64 && solaris // +build amd64,solaris package syscall diff --git a/src/testing/run_example.go b/src/testing/run_example.go index 4dc83f7d324..d9e342d4951 100644 --- a/src/testing/run_example.go +++ b/src/testing/run_example.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 !js // +build !js // TODO(@musiol, @odeke-em): re-unify this entire file back into diff --git a/src/testing/run_example_js.go b/src/testing/run_example_js.go index 1d4164b61f9..d914633ba91 100644 --- a/src/testing/run_example_js.go +++ b/src/testing/run_example_js.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 js // +build js package testing diff --git a/src/time/embed.go b/src/time/embed.go index cb4fdac4efa..34490c859dd 100644 --- a/src/time/embed.go +++ b/src/time/embed.go @@ -5,6 +5,7 @@ // This file is used with build tag timetzdata to embed tzdata into // the binary. +//go:build timetzdata // +build timetzdata package time diff --git a/src/time/genzabbrs.go b/src/time/genzabbrs.go index 9825e705d24..9fd2f2b7626 100644 --- a/src/time/genzabbrs.go +++ b/src/time/genzabbrs.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 ignore // +build ignore // diff --git a/src/time/sys_plan9.go b/src/time/sys_plan9.go index b7fba0802c2..4dc55e44aa5 100644 --- a/src/time/sys_plan9.go +++ b/src/time/sys_plan9.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 plan9 // +build plan9 package time diff --git a/src/time/sys_unix.go b/src/time/sys_unix.go index 97b1140bbcf..60fc090dc96 100644 --- a/src/time/sys_unix.go +++ b/src/time/sys_unix.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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package time diff --git a/src/time/tzdata/generate_zipdata.go b/src/time/tzdata/generate_zipdata.go index 21357fbf1c5..64b5b1b22c2 100644 --- a/src/time/tzdata/generate_zipdata.go +++ b/src/time/tzdata/generate_zipdata.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 ignore // +build ignore // This program generates zipdata.go from $GOROOT/lib/time/zoneinfo.zip. diff --git a/src/time/zoneinfo_ios.go b/src/time/zoneinfo_ios.go index 0f1e9334b5d..044691e1305 100644 --- a/src/time/zoneinfo_ios.go +++ b/src/time/zoneinfo_ios.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 ios // +build ios package time diff --git a/src/time/zoneinfo_js.go b/src/time/zoneinfo_js.go index 2d76a571f21..8245614d2e1 100644 --- a/src/time/zoneinfo_js.go +++ b/src/time/zoneinfo_js.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 js && wasm // +build js,wasm package time diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go index d2465eef653..4ea029dbde9 100644 --- a/src/time/zoneinfo_unix.go +++ b/src/time/zoneinfo_unix.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 aix || (darwin && !ios) || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris // +build aix darwin,!ios dragonfly freebsd linux,!android netbsd openbsd solaris // Parse "zoneinfo" time zone file. diff --git a/src/time/zoneinfo_unix_test.go b/src/time/zoneinfo_unix_test.go index f290ae754f1..b75b374c3d5 100644 --- a/src/time/zoneinfo_unix_test.go +++ b/src/time/zoneinfo_unix_test.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 aix || (darwin && !ios) || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris // +build aix darwin,!ios dragonfly freebsd linux,!android netbsd openbsd solaris package time_test -- GitLab