From d4b26382342c98a95b85140b2863bc30c48edd68 Mon Sep 17 00:00:00 2001 From: Russ Cox 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 Run-TryBot: Russ Cox TryBot-Result: Go Bot Reviewed-by: Jason A. Donenfeld Reviewed-by: Ian Lance Taylor --- 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 1bdd1c9dcb..4fdf2a04b3 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 6f17dbe307..5a9a35cbb4 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 581d87dca9..3957349d6e 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 ea84f1e40f..5a47526593 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 ecb1d0f81a..8c9fb723a5 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 2e13d6b57a..37b0d59ede 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 256c659259..5f9b030621 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 c6eb23a090..8cdbd4b0f3 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 326f491a69..5a0aaadf16 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 802f967aa6..9660e938b4 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 66ff0b8f22..cc04eaadfd 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 d64abf652c..0bc1097199 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 2f3aa16dec..298b385bcb 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 4059f261d4..9637ab97ab 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 bef510a578..6dbd1869b3 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 ffd54fe459..974acb82ef 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 821dc273d6..e87c84ce3e 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 b6d0aedbbf..43d28dc661 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 17a0e6fbb5..2db6d3a25e 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 dc897236fb..3255b80365 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 7e383f4b5b..a1f2727825 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 f6e10ca59c..7d5ff9bbb7 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 9e869b03ea..5cc0b0f101 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 342775a118..cdc2658372 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 1fa4327a89..a37b2ad6d1 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 bc480343fc..70f5d7a688 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 0798ee469a..908afb6c8c 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 2ac2052b8f..640d4406f4 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 ed07bac608..878a1e770d 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 19de27eb9b..dd27ce92bd 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 efc66461ed..729df5c681 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 70d6eddf2d..3d4b97d78e 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 34327dd841..3acc6695a7 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 407d48ea4a..b753346e7d 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 e4020b0b41..ed694581a7 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 ce8b501d53..0e9f381966 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 4fbc54d15c..fbe2bda2e5 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 5842b858f0..368f893198 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 f49278ec3a..e079d73990 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 0ac2391347..825e60b27a 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 5b2ed83624..dc3c1415db 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 65e4fa587b..bed45af6ed 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 5bd44bd345..d5c241857b 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 6fe7b7e4e4..3a20cac6cf 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 30334b0f30..9277de7fee 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 781702100a..08686cdfcf 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 72fa2b2ca6..a77e0f9317 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 2641ee62bf..453af402b4 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 aa5663355e..4d6ed2ec7f 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 931f49a069..8b77871b23 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 4b43d74f26..b9755c7e50 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 f43c67ac2d..533a93180c 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 22608e7e69..4e46970648 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 f67b89091c..a4d507d49a 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 20754d09f5..b4441297e6 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 776fc1b4f9..70e743fa65 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 4687c624de..918b86cdc5 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 a70dea9fda..5e1f2669d3 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 244b70f061..56d2321826 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 807fe24375..40a3222788 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 6bf96bcb2b..6564bd54a3 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 6b4025384b..c870fa2c18 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 8c5666f216..f9caa413e3 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 e0414e6b22..536e87e4ae 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 0c9fafdad7..dbbb9c2787 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 9c2d027366..acd5693c7d 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 ea0cc6f880..2b1a68d7f3 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 c569b40bb2..8dc56a8c7b 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 49b78c3a8b..1de0e457a2 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 646bdfa5c0..4251805ef9 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 80a68b4ef0..22ce3be7f3 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 084edddc4d..01b4e08757 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 ca9c4bbf39..03208402d7 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 8d2e43d327..f520208a37 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 72196211e5..68670a4f93 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 a434575dbc..e8b16b3668 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 b9209a789b..f5c9841a12 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 c23e414156..3bb7bb70b6 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 6cf7742e1b..c405718b5e 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 f74c607a88..8ad56638e9 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 160bdb12e3..40d9ed9d40 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 0d9478bfd6..91e613b631 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 812ce3c655..86e0f3cfe7 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 844f901d18..35b442f7a2 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 1468924cbc..29729fad01 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 f251e03d7f..bc2d58c069 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 0b46e70b60..ea4fbcd0b4 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 c9499715dc..85d4d9d47f 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 60267fd4bc..45e9351a31 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 837db83f77..fd50735c7d 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 7e939742ac..7ddc2b6169 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 548a5e4cb9..81277eb6a5 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 08acd044d0..4bb8b3324f 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 98038e5807..436f78c745 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 9c7df4e40a..93054efa7c 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 f95ea0eee4..feaba5a23a 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 5917a4862a..7ce88cbb2a 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 fe07e53b84..a6bb396f13 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 61362f4126..620c048b93 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 9024ce668a..faf732670a 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 18151cea24..e2386f29ab 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 613d1e02a3..6c22f44801 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 3eabd2c7c0..865a7356f1 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 1857185fe4..7ea90f8a7b 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 72718544ae..19fc698676 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 0572c6ccd8..abcdcdd91e 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 3163e3a4f7..f346ff4c7f 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 f04b6bd0d6..822e8573ff 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 c9ea7e80f3..05593bb105 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 d2dfb62b77..50432f3d2c 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 8bc6e7d9c4..05bd672d5d 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 4e537a4fe5..f2c2c0af38 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 0055b3b862..81f2f112d0 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 5ab6c931de..158bd7f91a 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 2dc4aaf5d7..2bdb2fe713 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 262fc079d5..dede825edd 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 878ed7c2fa..38038a65f3 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 b778df261a..ef3ee807bf 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 739671d73f..bba3a068d6 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 8be21d5d28..a03fa83d8c 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 8f93742f49..5965fea921 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 1c31e66625..994be877d9 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 17238c98df..8c0bbc4ff2 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 409b8c9d95..b562da177d 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 be03f0d7ff..d3fa2d1113 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 3025cd5681..e16e186e0d 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 c6aac9aa1b..c8ec7041fb 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 fe26a0ea84..28cb84f91d 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 3747f3b15a..32a25a4117 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 52709df17b..ca1d42c14d 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 1a5e542ab6..936e5bf3e0 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 d7af018af4..c98454c685 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 ffa3e257f4..ecaf4f9069 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 3243e53981..7bb257d865 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 36de5dc9cc..38f41303fa 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 d9cb3921e5..6508533f44 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 94184d71b6..3bc9b1e2ae 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 70e2ed1feb..77589d4c34 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 5ef9883dc6..1e36f36e80 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 bd4489a6b9..0690d0cf31 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 b53ba97463..baa188ff7a 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 5575e81ab8..1891d29b24 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 b1ff1d265a..a19a6f8223 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 98e859f925..2b8b139aeb 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 fde4214245..af56d8a294 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 0b012a8850..6ef639fafd 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 f96c5be491..965f38fe52 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 3c9e57c52a..ac6eee54b2 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 e094b97f97..ce1b250a18 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 9de2005c2e..8c481370da 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 fdaf43e1a2..8ac04fd8f9 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 2f7411ff1e..c3a3f9a8e9 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 f191db28d2..e8b5d529a4 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 0c4794a70a..d2f9d4499b 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 ce1c37a3c7..8d563b536c 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 beb1765427..2e7fd3ebb9 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 b840b823ba..3d17a9c730 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 73b191436d..b7c7345111 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 ba6bf69034..fd1217a05d 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 61db93bd51..e3e16cc161 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 ce72bc3896..2338b78f3a 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 3530e59a15..b1041da11d 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 0b23fc3210..55c548824f 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 e3bddb4bb2..c55f5f0df5 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 c40ffcd20f..bcc25dd666 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 abadf50930..f59c1f6dfa 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 120fc1195f..7bf0ddc792 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 642472bc2b..cc609e48ad 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 5ac814359a..8db5b66504 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 dd7956f14d..651a5ecd8b 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 d6b28e503c..760e24802e 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 222e5c6707..beb0f7d6a6 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 4edfa953a4..487f3285ee 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 4449eb3a15..1dcf51d419 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 2e77e76c87..fe8a5c8ec0 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 e2024471d4..805fa2ccd9 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 1fa47ab1a3..a0b11ed5ae 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 daeec96c38..87f284a56a 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 5fd5449bb0..d519f602c1 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 11f90e9696..c88d65cdc8 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 057067465b..f4058b298f 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 6f98947866..6fd5d86630 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 66005a9f5c..9eda85882c 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 ff7982ca9e..52191d85c6 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 bb5ea02c0a..4f2e2fb455 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 bd942c2934..4fb9600dee 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 c55a1e3c5b..d86c4c1f81 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 21cb40db70..fd5e20f1f4 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 4b3c642173..69207a4b89 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 0123fc33de..824de7569e 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 d83c0165b2..67b1305713 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 2e7d97beaa..40f2c99383 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 4bdbb55edb..73289f1cd0 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 b50029c198..6c0654943e 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 f857d68280..9b08864f7f 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 6c3a8c9160..4cc351ea27 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 c6ea206c12..050d401bc0 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 31fe6a5a7b..e53a2d1b75 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 e76c1cbdce..4cb4a5976b 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 6c75afc2ab..46a4f6b030 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 db25fcca98..a22986cb8a 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 a360b53c3d..a5a5080d46 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 37cc7943ee..d9565efcb6 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 f3ac8d29df..b0aac89580 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 f48da40188..a76025454c 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 6680942cb8..f353d4d73e 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 185d8320c9..4ed471532a 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 576937e3f5..b484ffef80 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 eb7973d65b..f60949f662 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 e3d4d16b33..02f08f57c7 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 ccb5d5585f..846ec93856 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 4288d37dee..993976569e 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 97c10f31df..6abd4ad124 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 207bcf57c1..62c6250845 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 a64eed29f1..2e45f0764f 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 1d2d37cf93..89108fe149 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 d519bdc87b..eea3d6b325 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 5faa3bd281..059f6f1325 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 f1a69e1df0..4193f3231c 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 ce6bca8885..8375ddbdd4 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 192b4bee00..61cb5c9457 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 5df5738848..4d610d33b8 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 1d3ad53fe6..ac4004df41 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 b068d5e0e3..5ab0b5fc57 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 f8e60c265f..78b42316de 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 8dad3c810b..654ccce481 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 9448edc339..ec81a4a31d 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 0afc10d727..7950e09fd7 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 3a25002842..851d5a0fb0 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 7c0dfe261c..ae93c595af 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 d6e0e63c3b..dc13917018 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 d0ad414a32..a94405ecc0 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 ab0368d14b..4b1a2e3e1d 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 a923c556d3..23be72140b 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 86d8f4dc1e..1bd6be93f7 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 4610246561..3714793a52 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 4610246561..3714793a52 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 3e3e77e17d..154405270f 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 abd04a814d..c4aab33eaa 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 3b13926107..f9cfad9909 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 e1e642bb41..22c67252f5 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 25c0721242..a84f5b0d34 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 041f8af129..039e4be88b 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 69c99fe7db..2ea86e074f 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 99d79a60c4..1f3d9ea207 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 8968b757a9..1fd1f29787 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 f1bbfedad0..6b9569cd92 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 db4c703b06..8f387ebc03 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 1fe3cf41b1..b1f2c55ea5 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 771cabcd3c..45e271c264 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 57cf5554ad..394bdb047e 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 3cfc9d81b8..108b973099 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 d7db0c8133..a3242ff3b2 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 0530c92c2e..b47b83af15 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 877e77c049..db9213a13f 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 0d7897a813..0e2317c469 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 2964982311..d851bf7566 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 d709a273b7..50eb66fc61 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 b411a378df..ea52a45ee8 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 556eb8c8d4..c304390819 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 e615330388..d0b5e2ce96 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 9ce9e12c5e..533a45e648 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 f3c69c407f..b8753cc092 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 53abd152c7..2945e46a48 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 1c9bba3b19..a7bbdd26b4 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 bfb8100f53..9f988fe899 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 8c09c0da1b..a70ef1b312 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 dba69554ca..4520d4b839 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 a28f1e066d..b9153d1947 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 cc20fe03e4..f998bac6ea 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 9396ce036a..bc58ea94cc 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 6bef310feb..0379848e70 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 30c6e48cfc..79599d006a 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 2ec736bfb1..eef7c79293 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 c6a221ac62..74c83a9172 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 23e65d56e8..4dc62407c6 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 d791cb3016..7578b1a16a 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 947dde71e6..8d0d9c3671 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 a809b5f5ce..6230e0bfee 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 ec58665e19..efe67c24d3 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 b2ef21e8ac..754db36e3c 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 bf41a0fb82..0d69fa5da4 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 3b0a48aef4..8af85d382e 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 4d9d414356..6aa8875b66 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 863edef0d3..cda74e8639 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 28ce72cb85..5aa2ecec08 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 7dc3518410..bfe9d4dbd3 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 421352c7b4..c7f8331c2e 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 0525512bff..e7cc45922e 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 a5fc5e644a..1e09ae9db4 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 e653f6ae17..c1514f1698 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 8e3543dfc7..a96448ee6c 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 8763d579fb..8d8a896501 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 d8c72096ed..b1dce29ac2 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 3b3c39bc7d..f4fcaed5cf 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 32a0d377da..3faaf00710 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 9055826d40..c09afb300f 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 46b9ba5008..742be2fcd8 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 a92dff56c2..645b267b78 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 bac84aa300..bcea630cd3 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 f2484f306d..c9ab25a4ad 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 2d5be2ee5f..dc17d3fbb8 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 8b9897699c..c8cff2d305 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 867e31e9ae..b50a1e59a1 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 0c48dd5c03..49dc57c6ff 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 409e1400af..6d6299e74a 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 c672d3e8eb..0dfd6c2cd7 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 96b9cdd121..85177cab9b 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 371deb502d..4b73886c51 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 a377d333d6..aeb9845fa7 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 4fdd9a37bc..a9a96a2323 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 6f83f52681..fc9b386256 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 cec977f75d..975aa8d956 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 a08ff89d1a..3ef7af33b7 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 0194ba67c8..75bbab8b27 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 53bc53af43..5753bc0289 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 d6057fd839..db72daa328 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 8cededce58..54667d672f 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 4ac5443e6a..8d4db7233d 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 73fb6be814..4c883ada78 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 5f345f0f4a..efc91fdb53 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 80b4169ec6..9b1e7880ae 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 c9f86af4e7..d804bfaacc 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 a3710dd3f7..9d77cb569b 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 8fd1e882c6..216e5d52f1 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 de7255667f..50b9bfa0a7 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 52624a35d8..99b5277ed0 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 20a6dc9549..56022fd1a5 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 b14963ff32..a2143aec2c 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 57cd289040..4175922cec 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 9106cb2c18..ce2e9046a9 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 8a0cda6564..be13cc924d 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 967b8bea9d..4d7112051f 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 257c11976f..7c4523c5ee 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 d6172bc503..9c9f1eae93 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 2bd591b594..41bd229132 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 5e00ba1564..d08832adc0 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 d043da123d..028d5fd29c 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 fb0ecb8dc7..a945889e00 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 205aaa430b..e1cf1467c3 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 bbfa4ed9c7..58c69f18ad 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 327eba6541..7a1ed4eb18 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 275c7c936d..1d1f27449f 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 0b13bf655f..71092e88fb 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 5dccc14653..29244f6471 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 6d8cb6a6f8..f79f2d0865 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 d603b7f70a..bf40ca2023 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 8b20f42b34..a0fedc2f99 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 0e1eab1c96..ef5c00aee0 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 c98f124782..0529dccd6f 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 3efc5e0d8d..6be6020f53 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 89430b3e20..d45e1deb83 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 31ae05a21e..580e915b73 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 2aeca82304..268b3a923a 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 18bcf3f4e4..e45282a0fd 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 b8191c5ebc..aa0c14b7d4 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 6f850204d6..3cfa30ee72 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 d4d67ac933..7b2c0c0c11 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 51c52427c2..467c069e1c 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 6750fb99b0..4eac25fe6f 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 66c1df76fb..d1d246accf 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 296480fd04..75bcdb1fdd 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 8cc24da8cb..a8c71831d8 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 8aa1e5e499..443d4e0218 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 a1703a1259..d1bbeb7529 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 d942cdb5e5..f14b3519fb 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 7b8b83652c..625430ecfc 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 a5947eaae1..105c03f0c1 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 5ee41a4b2e..9c64a0d474 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 f9a4b18f60..039448b557 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 39866a68de..10f8312831 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 2439192a9d..c3607344ec 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 795c547856..211f2a1798 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 f88450018e..e8b286c9ee 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 51693fd82a..9b4c0ab290 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 c99a8240c5..db38359492 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 0ef894b476..0af8019525 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 026ce62b9a..71b8cb8e25 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 115d6baa19..57959a2ea4 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 b98e53845c..b663618502 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 9e11cda8c9..ffc598b061 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 2554f5b087..8aebaf87a6 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 65429d0cab..826760f3df 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 c1a1b726af..d04540bc63 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 7c888baaa9..853e0eddfc 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 a0af37a5bb..3f7795b8cf 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 f8813ce6be..8d2eac7103 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 a8a485613f..e1e4509e2a 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 2e553d0b0f..7abe1ec5a0 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 bbc68af9fb..292d24c6f1 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 90a1eca156..9e241c43ac 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 8d20ccddfc..3badf5ba57 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 66c356fc62..8c17805f71 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 c09b1ac202..ab23d8111d 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 c15850692c..9979b43e8e 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 b1698f5d4c..1e245eb53a 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 e860654f81..4d6a64e8eb 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 8491bad242..e316eaf06c 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 0a39f46333..6d65e420f0 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 c0259ae0e8..e9b8b8ba3a 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 3307f790ea..abc9e9ce6d 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 1d341aa427..9ec32b3a78 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 e8fe26c47f..23d12e3247 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 9685414fc0..8393c5a474 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 17de3e98d4..d2fdfdc6b1 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 f3cbf6ce4a..d993d30570 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 70f7af7f97..c7b72062d5 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 8ca30b8c27..151aab49c2 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 178d814dda..c975a11964 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 0890cd8f2b..ed8c2dee9d 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 72d3b47534..c697802171 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 0f4cdc4533..28dc2a5939 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 5420b2db73..895f21069a 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 9c56eb2d41..1f3cb1cfe2 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 c9d6944518..4ce10095e6 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 c8a818fd6e..d72efcebe6 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 ec497d9e26..d4b6f967a3 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 d20e63a987..657945a81a 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 9200fdc3cb..aa85d4831c 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 1893203017..67855bed4b 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 30b79edaad..4ce912132c 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 7b86b41156..6444bc12f9 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 3ca617b21e..3178f1a154 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 cdadf9e66f..7302c1eedf 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 d6d69187b8..cfa6fe86e2 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 5c9ddbdc71..d56702ec70 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 76c0192c20..070d531bee 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 00fb7fced6..347ae6b363 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 74d0aed014..7e17d1fcd2 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 81c73bf399..f6215613c3 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 6495fcb5f8..e6e8040ae0 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 076fbc1a0a..ee63ea4c09 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 d5e0cc1e3e..17d26b4cc8 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 fb2da32c7e..4dc92ea321 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 de634dc957..15690ecb0b 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 7beb57ea12..7c926f4a2b 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 140c170ddc..7d25c51aa2 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 06c197ec2b..5f61476f21 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 803b031873..341c35ca56 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 b67a3de4f9..b93631e1d8 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 a0b3f84382..c4c41f95f2 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 efc68a767d..2fe0b1d12f 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 bb3e172498..dd38156999 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 3d477e8ef5..2fcdbe70d1 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 4085d6f418..df9c05dd5e 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 87e19c1598..d016db7d02 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 31f2191c76..0a06aa2370 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 23a6cac2bb..1605002ea2 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 a53fcc5933..f84ff1160d 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 e51dd32b5b..f6b6dd2c09 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 cc8c475387..2d41a97b57 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 95014fe6e7..225258901f 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 e196dff076..c258759549 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 7b14063386..022ef19427 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 1fb423b198..2cafad20cf 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 9315ba9346..3a8dfe2e99 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 3f5ce5adca..755992d18e 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 c26f246077..03c9c2de59 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 f18a7b1fe3..9fda1d7d22 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 cb0dce66b4..e7f4f6cece 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 ff7e21c71e..8d323449d1 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 22df59094d..e644f9c6dd 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 0493178880..a0b38319a5 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 af353bbcd9..95517b2a95 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 ed4242ef24..18ccecd5cd 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 a727a93114..34c970d6d2 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 aeaf37f64b..bf4a815899 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 9d580d3313..31c8e43b3f 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 8f66770fb9..82032e6bfb 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 307c63fd68..215e234286 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 3051bd5880..10a735327a 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 966f70e1aa..7fa8eb7cab 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 d1283824ad..1bee666bd7 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 1bfcb1143d..d4aed6b671 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 546b3d6120..2e9374ca26 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 d49bee8936..131c687e1b 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 b0109d72b0..5b407ebc7a 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 1336b50121..80cd65b333 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 e4b109f0ec..98101e3287 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 62e30d1788..1275884b2f 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 9bbc48d94f..51f64a6e5c 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 3c8898236c..e76d8dd064 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 9cbf48216c..bf1494d48a 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 c286d0df2b..98a2401bfe 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 d21c1d7d2a..d8faa5c786 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 9085fb0ea8..b64a69c9b4 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 ed7ef2ebcb..de6f85347b 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 faf3111053..b762bb069f 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 cb28301e0b..e5297e4b16 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 315dea1c84..b5f4ed390c 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 5258cbfbe7..73777cceb2 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 1721698518..0c81c36c09 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 44c4624da9..d63ce27d24 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 eb63225430..2d577890b2 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 e0ebfbf038..8af919d03a 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 ef26aa3201..f6f12a5ddc 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 32c2d46d4c..a8379601f4 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 3a6e56763c..f2ec5dcba7 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 d8f6b49093..83a3312f5f 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 0ba843b5ac..1dfcc84997 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 20a1b234a6..91aba5a0f6 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 ffdda0c827..edce50234e 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 b4949510d5..5ae9560ab0 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 0f6df411ce..e2a0134aff 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 e69afb0cb3..52e85dea37 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 0631d02aa5..f3b907471f 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 d356a40bec..e28baf7c48 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 6aa2db7e3a..3c7f7b543e 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 88ee1174f1..f844d29e2a 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 8de2ec0559..8999a2797a 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 183ccb02a1..a546488bf8 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 d04134e1df..02a4ca06e8 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 cf6e9d61f0..033eec623d 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 1d9279ab38..28226ad60a 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 0f718d704f..01546e4b9f 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 2ae149ff13..9d658b20ee 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 7d4d61e4ca..0f55454a95 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 30aec46df3..d0347464d6 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 4bb8c99bce..05c3007e2c 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 d1f4290204..7d07fa3a45 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 d22be46fc0..d6e5b9b0cb 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 f07ff1c06b..c00f0965bd 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 9d821b989e..4812dd1156 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 0161955f09..578bce0414 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 91467fdfae..017b481c64 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 14bdc76842..04e7e85c12 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 671e524e45..3c0a7ca67e 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 7dcd8f5fe9..f3d2c00914 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 88ac95a004..702bf5f24c 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 bc672019fb..dcbb9a1d51 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 957ed36ffa..fe940360c0 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 ef297f073e..8632fe08a3 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 d650292394..8d78a3923a 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 1d614dd003..3069d6ed04 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 b92d1fed5f..b4a117d343 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 1b1848b79e..7460eb3104 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 331dadade9..fceb4e7a18 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 ffacb46c18..16577346a7 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 6a5960b0a8..25aaf94e26 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 374d13f30b..b1096a6750 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 b38c58399b..076a722eb7 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 75acdb62dd..6d5e4ff021 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 822b2944db..d92cf97217 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 e3639d99b1..f138d1f956 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 d739f57864..1d6a9b525c 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 77eb3aa4c6..afb208a455 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 58f4fa8754..371ac59f8e 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 b2af3b89b2..8366f28914 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 3bd93c1f20..80d1b0cf18 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 3599f2d01b..33ab8eba58 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 3517a5ddbe..94b7c7a467 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 e90128bb6d..9ad5dde382 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 303f0876de..557b17cc75 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 6947a05d04..fde6fbf1b1 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 01efb9b7c9..8fe0cb6718 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 5b2c53795a..52b64e7602 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 c5fd742048..5260f22f57 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 9860002ee4..806d02fee8 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 e1d0952ddf..fe1973dbde 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 815a83a04b..bd76442dbd 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 00fb02e4bf..ef8b3f7d43 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 895b4cd5f4..59b5aacaeb 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 155f415e71..8104f63627 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 3aedc23ef9..c093d2ec0f 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 d91fa1a0d1..5667774d82 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 e65697bdb3..6134b6c02f 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 e2f5409354..3829683c80 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 2edb0358b0..3f43ade558 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 16ff2b8e25..6facf31593 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 f37da04194..0f3d5f0b73 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 81cfb085aa..3b1707126b 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 aea8401a37..acbdd1ff45 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 c11a45fd69..3ef40d3de7 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 6fdcc6cc38..e175dd380c 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 7954673811..269f21bc2f 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 14321b0934..1b86dbff5b 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 3066a1521e..365e86a611 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 79fd21765d..cc8c5db1bd 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 17dc32013f..4a959d9aba 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 d6a14b79e7..fe50900ec8 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 c00ce4d3df..9c0d48d6bd 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 d433af6bd0..8c880b8570 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 84f0acece6..acd6e47f98 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 307a1ea6c0..e490d766dd 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 d6bb323cde..e904ebd20d 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 db846c5d2a..cbce5a8f18 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 a6c34a8352..f11f8456a0 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 180f707b1a..0e431b8103 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 81ed1291b8..5b92879c20 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 bb0b747606..f71f8afa57 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 b0cbbbe3e6..0251c676e6 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 9b371b0732..905e932b7d 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 3c888579d0..76f37b1b53 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 065aff48d3..5824eaddb5 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 c17563e2a5..a0becd431e 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 3eeb5e044f..e45fbb4a87 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 156d9d384c..4d9c6224a2 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 b559b93938..f04750084f 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 b608197d60..f0a75ac3ea 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 c88ac4d521..f3969c5aac 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 97cb26d587..d9d3e55ec2 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 2a347ff4cb..1616b57027 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 8c29f59bd1..dcc7f1e9dd 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 5de93a330a..f2225da9a1 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 93363a4746..e6b1b14130 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 3f70707ab4..f2e526973d 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 33a9b92ee7..05bc6f8e71 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 28b9e26d0f..a282c7aca7 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 16aeeb2ef0..e23446bea4 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 38d686544f..dc1debddab 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 51ef470ce7..af9c7e56eb 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 96096d236b..525b324c81 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 1885d32051..b895be4c70 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 e75fcf6c95..ba267009ca 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 652e7a9e34..05a4d0d38d 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 707b295f7a..9bffb35b67 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 e1ea05cf0b..f9b98595fc 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 26f5bb20ca..0841b413fd 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 996c032105..99d073517b 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 cb429c3147..842a4a7084 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 2819218d5f..2038eb7d79 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 440937498f..66821b1f76 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 fcddf4d6a5..362fa777ef 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 44c7871ceb..43e0058985 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 33032596c3..73157043be 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 4d4c88e3ac..751c00c2b3 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 796f27c4e3..69bd99fa09 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 8f21585d28..0866e3140e 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 c64d2994a9..1238744ebf 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 1912a94e87..13bf1c2d4f 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 82cf63edff..fe38a086fc 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 459bf8e543..2ef8d4665f 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 68777ee4a9..53b10885af 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 2720f33eed..456173b0f5 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 6ded9d621a..9923bd4697 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 122cc8b128..74b2f1435a 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 1fa5d80dcc..23a5a8c322 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 7f4019c0d6..c66fbf8216 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 6e2942498d..ae211f96b1 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 3a0f947612..395ddbba69 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 f30946e4c5..b741dbfcdc 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 996c0611fd..cf631bdcca 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 cf3327c6fe..56f0674f4e 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 6b1467b1c4..a4656fd728 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 e7eb573737..ed04e33568 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 bf24db714a..53542dbd1a 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 3bf5cbc00b..5d5949f3ca 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 e1766040a7..1538477bc5 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 7f66f2a8bb..9780c28ef3 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 a3a547d1b6..875a0eb147 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 0e6e90a6c6..79678341d4 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 ad98350b2b..65666daab4 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 f10c4e8e0e..c4b44893f0 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 aaa1c27626..e91fdb6c1f 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 f67ee6064b..452d4cf14b 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 524689ae2d..463033d558 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 fab123d4a7..9e1222e81c 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 7dac98ff4b..8ed3caa9d4 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 3c26005ab5..dc0947fa6e 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 43b081d640..a894445f73 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 a4bb28cc45..022ef6ed73 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 22b752cf27..17c7ac0664 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 940a81b58e..9c1fbbaeab 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 3722858325..3c8e87d32f 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 45d3f85baf..507eff8ab3 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 b6acad96ea..b0099cb4b0 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 ac3a5754ae..7d89eaae63 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 6b8f1ad383..f54fc8385d 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 1f49c78ef9..1f38de22b2 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 d6b6f51fa6..10bad5ac46 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 4c3d0f6d2a..2d2c67673d 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 568efca7d4..3b43b6aede 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 e11aed6ed1..2f3277497c 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 d9999cb8b8..c7ddcf26ab 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 c9a0c4996e..cd98779ac9 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 673feea77f..0170516201 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 66bb8acba2..936c8a163a 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 e53d14bed1..39461145e9 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 ef89128310..94e8d92eff 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 240254b2c7..d8e8a713c5 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 d0b3644b59..e3909f1afb 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 baaad6df98..89fb75f03c 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 ff10be9d25..85097025a0 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 25f171bda8..ed462025bb 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 a873d826b8..b968c7c7f3 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 b364eeaba5..e9321a4e64 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 aed8682237..412833a37c 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 e70ba3df89..5300bed471 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 b0b7f61d22..64897fe43c 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 38c83c92f9..3b36f66fa2 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 1ff97a5ae1..99913b9a88 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 40f03142a6..bd8dcfa34c 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 1c7ec588bc..595e705856 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 f2bc3f5147..2d8a8cbfe6 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 f03a923112..351a96edc1 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 1ebdcb20a2..66ec67b0ab 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 3ccfe5d463..89c7959d0c 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 d70a436d13..ef95fe58f7 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 0ab8c3fba4..c17c6fcdcf 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 ab25b7be6f..dd51f3d00a 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 377946fc92..7894bdd465 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 45bf667407..495ae29757 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 2c7d0f8c90..0d6761d49e 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 042615bf2a..610c66fd34 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 6b7f54dcfd..45729d9e8e 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 786ad34170..40fc8b8a30 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 7e6a8c9043..a05fff5136 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 a7c4f8c890..64d958415d 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 5dec57a25a..cf88aeb921 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 c94cef8686..5eaa2daabd 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 bca51df08d..e4f3d50f56 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 cbc47cc6c1..6588d690ea 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 7b3a9d2335..c2a32c0782 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 53bc12403b..9f8d5bc3dd 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 f686021121..d741411703 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 abb282f3e4..254e3e7cfe 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 9de32d9c01..bf76be978b 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 30ab2dc845..0bd25ea3c9 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 922864815b..8b41cdca23 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 76a74508d2..179f791481 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 58799fbde7..0b9897284c 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 8b433616ee..5f210fd1c4 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 3434a85d34..b572f44a6b 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 85786a5b4e..aec26ad778 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 b3ebf3d474..d6d13e4155 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 29eabb1d2d..15c714fad8 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 82ee158478..b20ce7d823 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 53a442d108..fb64932ad6 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 0b4c60dd4c..3a92bcdbb4 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 9a8d9e8579..e013d8e7fd 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 f0caf552b2..1a4d33e3fd 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 f064731ae5..1dda43be70 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 41e21a510e..6d56f1c998 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 bf1e4a74c3..6a58946a4a 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 247e78e6c6..f5c5c2f49c 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 f23cd8693f..c9d4579b41 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 6f6453f6ee..e35bff7f3e 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 7985abe3f0..04d1b3f177 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 9c4ff2955f..923a3a47c5 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 493a8389f2..89a4e6d89a 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 eba401544a..b7dee69602 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 20625c1a3e..134ae41165 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 4f2cdf861e..13dfacdba2 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 0d8598d816..79576eedf7 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 578b5a3e9e..4799d1dcb0 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 ddc265f190..7137d66f0b 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 a0f79522b9..d721dafde2 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 2cd23d3db6..d9dbea921a 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 1b177383c2..a24f0115e2 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 5a749ff3f3..ac822d6f7a 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 34b624c1d4..ed37fa8dec 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 4d133766f7..213aaf3bac 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 e7f7b7e3f8..e2f9c0fd9b 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 a8522dc571..617c2f5466 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 1219fcc6cb..793d4b9884 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 c3737bf3cf..54e1760bda 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 5006f4a409..ba7e2118c0 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 323be988be..c3437722e0 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 99aea6b559..acc34a76d2 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 afa8945944..d662d780db 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 5717206f28..20f8c61366 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 7e0210081e..07ff5fba5f 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 e9ee790501..ffb4e059a4 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 37438b020b..37df77e5e8 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 758f398228..c5eb57a226 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 decd169f0d..7d4c4d342a 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 733050ad1d..b4698b79e2 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 dce0a540e6..31425b3558 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 2093eb74e5..de6db1e3fa 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 ded05686c4..70fd1474fd 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 998c6c555e..8b7727b343 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 02a28294ea..bed9108ea6 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 449823976d..7bbcf9b4b7 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 446ebfc503..9b37dc0950 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 a2331bee8a..f66f7d2715 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 9548717945..6fa146368a 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 9ce11f5899..855188f045 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 bb6e9d7ac3..1ed7e3ee8d 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 f5d81abc51..d72dbc944a 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 006b49c245..4f4dc4db79 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 0ce3d05cf2..ab1a05258e 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 6bcd22185e..792f43550e 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 70ca68639f..9ea18d6111 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 39ddc6536b..ccae9c15e3 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 22a88b4dfe..17c54a2c83 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 5882a7c058..a0d37ff1f2 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 4fb3f6cd29..f8f82d2043 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 514d1f8cfd..4ff8d80341 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 db05c03ecd..929da07604 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 9a10a4383a..998238518b 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 31e13bf3b6..b3f5034390 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 39b9c78288..b289886d6c 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 e176c4e23e..8cf2b68dcd 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 96bbdb09f5..cc33773a05 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 be198f899b..23c9c715b5 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 da56f0da22..8feacc47ab 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 82685ff659..8079d22429 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 e9e811f776..a51e0038bb 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 27d82dea10..1739726883 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 8abfbb45d6..0457d8e995 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 ff552a6a63..29c8380d89 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 6d56fc85cf..6472db0080 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 0252620f48..251a0c0b4a 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 1fb0ee566f..34c953fc8b 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 a88b577bed..4de656b491 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 f63391cdad..bed9cb0851 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 8b6be21e2e..355533fb27 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 a9c3ee2626..94e12c742c 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 737abb87c7..321460f45a 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 cf059f79ff..370d717263 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 c532b3a7af..557c634533 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 6d7f9edf34..19f3690341 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 c2a03ebdd8..222c6c7e46 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 1a659ba2fe..644ee9b3df 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 f846666fff..64e16b4943 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 4dc83f7d32..d9e342d495 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 1d4164b61f..d914633ba9 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 cb4fdac4ef..34490c859d 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 9825e705d2..9fd2f2b762 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 b7fba0802c..4dc55e44aa 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 97b1140bbc..60fc090dc9 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 21357fbf1c..64b5b1b22c 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 0f1e9334b5..044691e130 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 2d76a571f2..8245614d2e 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 d2465eef65..4ea029dbde 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 f290ae754f..b75b374c3d 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 -- 2.48.1