diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go
index d6ef53327d43..ad176040d68c 100644
--- a/accounts/keystore/watch.go
+++ b/accounts/keystore/watch.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build (darwin && !ios && cgo) || freebsd || (linux && !arm64) || netbsd || solaris
// +build darwin,!ios,cgo freebsd linux,!arm64 netbsd solaris
package keystore
diff --git a/accounts/keystore/watch_fallback.go b/accounts/keystore/watch_fallback.go
index de0e87f8a5a7..e40eca42fe75 100644
--- a/accounts/keystore/watch_fallback.go
+++ b/accounts/keystore/watch_fallback.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build (darwin && !cgo) || ios || (linux && arm64) || windows || (!darwin && !freebsd && !linux && !netbsd && !solaris)
// +build darwin,!cgo ios linux,arm64 windows !darwin,!freebsd,!linux,!netbsd,!solaris
// This is the fallback implementation of directory watching.
diff --git a/cmd/utils/diskusage.go b/cmd/utils/diskusage.go
index c3d51765f8ec..09844652ef97 100644
--- a/cmd/utils/diskusage.go
+++ b/cmd/utils/diskusage.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !windows && !openbsd
// +build !windows,!openbsd
package utils
diff --git a/cmd/utils/diskusage_openbsd.go b/cmd/utils/diskusage_openbsd.go
index 54f759d29193..52502d0cfa17 100644
--- a/cmd/utils/diskusage_openbsd.go
+++ b/cmd/utils/diskusage_openbsd.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build openbsd
// +build openbsd
package utils
diff --git a/common/fdlimit/fdlimit_bsd.go b/common/fdlimit/fdlimit_bsd.go
index 86181337a2d7..a3a6902c0925 100644
--- a/common/fdlimit/fdlimit_bsd.go
+++ b/common/fdlimit/fdlimit_bsd.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build freebsd || dragonfly
// +build freebsd dragonfly
package fdlimit
diff --git a/common/fdlimit/fdlimit_unix.go b/common/fdlimit/fdlimit_unix.go
index e5a575f7a79d..a1f388ebb78d 100644
--- a/common/fdlimit/fdlimit_unix.go
+++ b/common/fdlimit/fdlimit_unix.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build linux || netbsd || openbsd || solaris
// +build linux netbsd openbsd solaris
package fdlimit
diff --git a/core/mkalloc.go b/core/mkalloc.go
index 5118a4fcb327..df167d7082cd 100644
--- a/core/mkalloc.go
+++ b/core/mkalloc.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build none
// +build none
/*
diff --git a/crypto/blake2b/blake2bAVX2_amd64.go b/crypto/blake2b/blake2bAVX2_amd64.go
index 0d52b186990b..3a85d0e73a6b 100644
--- a/crypto/blake2b/blake2bAVX2_amd64.go
+++ b/crypto/blake2b/blake2bAVX2_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 go1.7 && amd64 && !gccgo && !appengine
// +build go1.7,amd64,!gccgo,!appengine
package blake2b
diff --git a/crypto/blake2b/blake2b_amd64.go b/crypto/blake2b/blake2b_amd64.go
index 4dbe90da8f1a..a318b2b61767 100644
--- a/crypto/blake2b/blake2b_amd64.go
+++ b/crypto/blake2b/blake2b_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 !go1.7 && amd64 && !gccgo && !appengine
// +build !go1.7,amd64,!gccgo,!appengine
package blake2b
diff --git a/crypto/blake2b/blake2b_f_fuzz.go b/crypto/blake2b/blake2b_f_fuzz.go
index ab73342803f8..b2f4057074b7 100644
--- a/crypto/blake2b/blake2b_f_fuzz.go
+++ b/crypto/blake2b/blake2b_f_fuzz.go
@@ -1,3 +1,4 @@
+//go:build gofuzz
// +build gofuzz
package blake2b
diff --git a/crypto/blake2b/blake2b_ref.go b/crypto/blake2b/blake2b_ref.go
index 9d0ade473a14..095c71a648c6 100644
--- a/crypto/blake2b/blake2b_ref.go
+++ b/crypto/blake2b/blake2b_ref.go
@@ -2,6 +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 || appengine || gccgo
// +build !amd64 appengine gccgo
package blake2b
diff --git a/crypto/blake2b/register.go b/crypto/blake2b/register.go
index efd689af4b49..9d8633963cb6 100644
--- a/crypto/blake2b/register.go
+++ b/crypto/blake2b/register.go
@@ -2,6 +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.9
// +build go1.9
package blake2b
diff --git a/crypto/bls12381/arithmetic_decl.go b/crypto/bls12381/arithmetic_decl.go
index ec0b21e80554..f6d232d658be 100644
--- a/crypto/bls12381/arithmetic_decl.go
+++ b/crypto/bls12381/arithmetic_decl.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build (amd64 && blsasm) || (amd64 && blsadx)
// +build amd64,blsasm amd64,blsadx
package bls12381
diff --git a/crypto/bls12381/arithmetic_fallback.go b/crypto/bls12381/arithmetic_fallback.go
index 91cabf4f3dcc..c09ae0d91c72 100644
--- a/crypto/bls12381/arithmetic_fallback.go
+++ b/crypto/bls12381/arithmetic_fallback.go
@@ -31,6 +31,7 @@
// Package bls (generated by goff) contains field arithmetics operations
+//go:build !amd64 || (!blsasm && !blsadx)
// +build !amd64 !blsasm,!blsadx
package bls12381
diff --git a/crypto/bls12381/arithmetic_x86_adx.go b/crypto/bls12381/arithmetic_x86_adx.go
index 9c30741e6af1..a40c7384eb57 100644
--- a/crypto/bls12381/arithmetic_x86_adx.go
+++ b/crypto/bls12381/arithmetic_x86_adx.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build amd64 && blsadx
// +build amd64,blsadx
package bls12381
diff --git a/crypto/bls12381/arithmetic_x86_noadx.go b/crypto/bls12381/arithmetic_x86_noadx.go
index eaac4b45d7dc..679b30ec8c3a 100644
--- a/crypto/bls12381/arithmetic_x86_noadx.go
+++ b/crypto/bls12381/arithmetic_x86_noadx.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build amd64 && blsasm
// +build amd64,blsasm
package bls12381
diff --git a/crypto/bn256/bn256_fast.go b/crypto/bn256/bn256_fast.go
index 14b596539388..e3c9b605184f 100644
--- a/crypto/bn256/bn256_fast.go
+++ b/crypto/bn256/bn256_fast.go
@@ -2,6 +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 bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
diff --git a/crypto/bn256/bn256_slow.go b/crypto/bn256/bn256_slow.go
index 49021082f5a3..4c0c351e2da7 100644
--- a/crypto/bn256/bn256_slow.go
+++ b/crypto/bn256/bn256_slow.go
@@ -2,6 +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 bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
diff --git a/crypto/bn256/cloudflare/gfp_decl.go b/crypto/bn256/cloudflare/gfp_decl.go
index fdea5c11a5be..ec4018e88a0c 100644
--- a/crypto/bn256/cloudflare/gfp_decl.go
+++ b/crypto/bn256/cloudflare/gfp_decl.go
@@ -1,3 +1,4 @@
+//go:build (amd64 && !generic) || (arm64 && !generic)
// +build amd64,!generic arm64,!generic
package bn256
diff --git a/crypto/bn256/cloudflare/gfp_generic.go b/crypto/bn256/cloudflare/gfp_generic.go
index 8e6be9596194..7742dda4c945 100644
--- a/crypto/bn256/cloudflare/gfp_generic.go
+++ b/crypto/bn256/cloudflare/gfp_generic.go
@@ -1,3 +1,4 @@
+//go:build (!amd64 && !arm64) || generic
// +build !amd64,!arm64 generic
package bn256
diff --git a/crypto/secp256k1/dummy.go b/crypto/secp256k1/dummy.go
index c0f2ee52c0c9..65a75080f60a 100644
--- a/crypto/secp256k1/dummy.go
+++ b/crypto/secp256k1/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// This file is part of a workaround for `go mod vendor` which won't vendor
diff --git a/crypto/secp256k1/panic_cb.go b/crypto/secp256k1/panic_cb.go
index 5da2bea376e4..a30b04f51b42 100644
--- a/crypto/secp256k1/panic_cb.go
+++ b/crypto/secp256k1/panic_cb.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 !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
package secp256k1
diff --git a/crypto/secp256k1/scalar_mult_cgo.go b/crypto/secp256k1/scalar_mult_cgo.go
index f28a1c782687..8afa9d023b07 100644
--- a/crypto/secp256k1/scalar_mult_cgo.go
+++ b/crypto/secp256k1/scalar_mult_cgo.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 !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
package secp256k1
diff --git a/crypto/secp256k1/scalar_mult_nocgo.go b/crypto/secp256k1/scalar_mult_nocgo.go
index 55756b5be849..22f53ac6ae65 100644
--- a/crypto/secp256k1/scalar_mult_nocgo.go
+++ b/crypto/secp256k1/scalar_mult_nocgo.go
@@ -2,6 +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 || !cgo
// +build gofuzz !cgo
package secp256k1
diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go
index a1bcf7796e9e..c9c01b3209af 100644
--- a/crypto/secp256k1/secp256.go
+++ b/crypto/secp256k1/secp256.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 !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
// Package secp256k1 wraps the bitcoin secp256k1 C library.
package secp256k1
diff --git a/crypto/signature_cgo.go b/crypto/signature_cgo.go
index 843360298010..bd72d97d3b62 100644
--- a/crypto/signature_cgo.go
+++ b/crypto/signature_cgo.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !nacl && !js && cgo && !gofuzz
// +build !nacl,!js,cgo,!gofuzz
package crypto
diff --git a/crypto/signature_nocgo.go b/crypto/signature_nocgo.go
index 77c8a1db0be2..fd1e66c7e6fa 100644
--- a/crypto/signature_nocgo.go
+++ b/crypto/signature_nocgo.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build nacl || js || !cgo || gofuzz
// +build nacl js !cgo gofuzz
package crypto
diff --git a/crypto/signify/signify_fuzz.go b/crypto/signify/signify_fuzz.go
index f9167900ad65..2dc9b2102faa 100644
--- a/crypto/signify/signify_fuzz.go
+++ b/crypto/signify/signify_fuzz.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build gofuzz
// +build gofuzz
package signify
diff --git a/ethdb/leveldb/leveldb.go b/ethdb/leveldb/leveldb.go
index 5d19cc3577de..9ff1a2ce1d68 100644
--- a/ethdb/leveldb/leveldb.go
+++ b/ethdb/leveldb/leveldb.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !js
// +build !js
// Package leveldb implements the key-value database layer based on LevelDB.
diff --git a/internal/debug/loudpanic.go b/internal/debug/loudpanic.go
index 572ebcefa14f..86e6bc88f83f 100644
--- a/internal/debug/loudpanic.go
+++ b/internal/debug/loudpanic.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build go1.6
// +build go1.6
package debug
diff --git a/internal/debug/loudpanic_fallback.go b/internal/debug/loudpanic_fallback.go
index 4ce4985da7c9..377490e5bee5 100644
--- a/internal/debug/loudpanic_fallback.go
+++ b/internal/debug/loudpanic_fallback.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !go1.6
// +build !go1.6
package debug
diff --git a/internal/debug/trace.go b/internal/debug/trace.go
index cab5deaafd6c..a273e4a9db84 100644
--- a/internal/debug/trace.go
+++ b/internal/debug/trace.go
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
-//+build go1.5
+//go:build go1.5
+// +build go1.5
package debug
diff --git a/internal/debug/trace_fallback.go b/internal/debug/trace_fallback.go
index 4118ff4087ee..ec07d991efd6 100644
--- a/internal/debug/trace_fallback.go
+++ b/internal/debug/trace_fallback.go
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
-//+build !go1.5
+//go:build !go1.5
+// +build !go1.5
// no-op implementation of tracing methods for Go < 1.5.
diff --git a/log/handler_go13.go b/log/handler_go13.go
index 0843ed0e5f38..4df694debed8 100644
--- a/log/handler_go13.go
+++ b/log/handler_go13.go
@@ -1,3 +1,4 @@
+//go:build !go1.4
// +build !go1.4
package log
diff --git a/log/handler_go14.go b/log/handler_go14.go
index 05dedbf2a70e..d0cb14aa063b 100644
--- a/log/handler_go14.go
+++ b/log/handler_go14.go
@@ -1,3 +1,4 @@
+//go:build go1.4
// +build go1.4
package log
diff --git a/log/syslog.go b/log/syslog.go
index 71a17b30b3e0..451d831b6dd1 100644
--- a/log/syslog.go
+++ b/log/syslog.go
@@ -1,3 +1,4 @@
+//go:build !windows && !plan9
// +build !windows,!plan9
package log
diff --git a/metrics/cpu_disabled.go b/metrics/cpu_disabled.go
index b0b483ee4bce..025d97aeb32a 100644
--- a/metrics/cpu_disabled.go
+++ b/metrics/cpu_disabled.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build ios || js
// +build ios js
package metrics
diff --git a/metrics/cpu_enabled.go b/metrics/cpu_enabled.go
index edb824d9aa44..533d40b85a58 100644
--- a/metrics/cpu_enabled.go
+++ b/metrics/cpu_enabled.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !ios && !js
// +build !ios,!js
package metrics
diff --git a/metrics/cputime_nop.go b/metrics/cputime_nop.go
index 1bf5537277fe..0188735a7833 100644
--- a/metrics/cputime_nop.go
+++ b/metrics/cputime_nop.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build windows || js
// +build windows js
package metrics
diff --git a/metrics/cputime_unix.go b/metrics/cputime_unix.go
index 55871e668c8a..3c56a75d0077 100644
--- a/metrics/cputime_unix.go
+++ b/metrics/cputime_unix.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !windows && !js
// +build !windows,!js
package metrics
diff --git a/metrics/disk_nop.go b/metrics/disk_nop.go
index 4319f8b277f8..58fa4e02f898 100644
--- a/metrics/disk_nop.go
+++ b/metrics/disk_nop.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !linux
// +build !linux
package metrics
diff --git a/metrics/runtime_cgo.go b/metrics/runtime_cgo.go
index 11722f76ccd5..4307ebdba689 100644
--- a/metrics/runtime_cgo.go
+++ b/metrics/runtime_cgo.go
@@ -1,3 +1,4 @@
+//go:build cgo && !appengine && !js
// +build cgo,!appengine,!js
package metrics
diff --git a/metrics/runtime_gccpufraction.go b/metrics/runtime_gccpufraction.go
index ca12c05bac74..28cd44752b45 100644
--- a/metrics/runtime_gccpufraction.go
+++ b/metrics/runtime_gccpufraction.go
@@ -1,3 +1,4 @@
+//go:build go1.5
// +build go1.5
package metrics
diff --git a/metrics/runtime_no_cgo.go b/metrics/runtime_no_cgo.go
index e760af554f1a..1799bef63bfb 100644
--- a/metrics/runtime_no_cgo.go
+++ b/metrics/runtime_no_cgo.go
@@ -1,3 +1,4 @@
+//go:build !cgo || appengine || js
// +build !cgo appengine js
package metrics
diff --git a/metrics/runtime_no_gccpufraction.go b/metrics/runtime_no_gccpufraction.go
index be96aa6f1be9..af1a4b63c809 100644
--- a/metrics/runtime_no_gccpufraction.go
+++ b/metrics/runtime_no_gccpufraction.go
@@ -1,3 +1,4 @@
+//go:build !go1.5
// +build !go1.5
package metrics
diff --git a/metrics/syslog.go b/metrics/syslog.go
index a0ed4b1b2364..551a2bd0f072 100644
--- a/metrics/syslog.go
+++ b/metrics/syslog.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package metrics
diff --git a/mobile/geth_android.go b/mobile/geth_android.go
index 8e4ebe638f8c..cfdf1c28c97f 100644
--- a/mobile/geth_android.go
+++ b/mobile/geth_android.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build android
// +build android
package geth
diff --git a/mobile/geth_ios.go b/mobile/geth_ios.go
index 307cd0858044..aab839727fa5 100644
--- a/mobile/geth_ios.go
+++ b/mobile/geth_ios.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build ios
// +build ios
package geth
diff --git a/mobile/geth_other.go b/mobile/geth_other.go
index 6f0c5dda683c..c5cad4a7ba8e 100644
--- a/mobile/geth_other.go
+++ b/mobile/geth_other.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !android && !ios
// +build !android,!ios
package geth
diff --git a/p2p/netutil/toobig_notwindows.go b/p2p/netutil/toobig_notwindows.go
index 47b64385723c..f9f936ae568c 100644
--- a/p2p/netutil/toobig_notwindows.go
+++ b/p2p/netutil/toobig_notwindows.go
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
-//+build !windows
+//go:build !windows
+// +build !windows
package netutil
diff --git a/p2p/netutil/toobig_windows.go b/p2p/netutil/toobig_windows.go
index dfbb6d44f0a5..652903e83c30 100644
--- a/p2p/netutil/toobig_windows.go
+++ b/p2p/netutil/toobig_windows.go
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
-//+build windows
+//go:build windows
+// +build windows
package netutil
diff --git a/rlp/safe.go b/rlp/safe.go
index a80380aef473..6f3b151ffa87 100644
--- a/rlp/safe.go
+++ b/rlp/safe.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build nacl || js || !cgo
// +build nacl js !cgo
package rlp
diff --git a/rlp/unsafe.go b/rlp/unsafe.go
index 94ed5405a8e4..30bb9a6595ab 100644
--- a/rlp/unsafe.go
+++ b/rlp/unsafe.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !nacl && !js && cgo
// +build !nacl,!js,cgo
package rlp
diff --git a/rpc/constants_unix.go b/rpc/constants_unix.go
index 2f98d6499b7a..1f04d15d7fd9 100644
--- a/rpc/constants_unix.go
+++ b/rpc/constants_unix.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
package rpc
diff --git a/rpc/constants_unix_nocgo.go b/rpc/constants_unix_nocgo.go
index ecb231f92714..a62e4ee529df 100644
--- a/rpc/constants_unix_nocgo.go
+++ b/rpc/constants_unix_nocgo.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build !cgo && !windows
// +build !cgo,!windows
package rpc
diff --git a/rpc/ipc_js.go b/rpc/ipc_js.go
index 7e7554a76887..453a20bc1aeb 100644
--- a/rpc/ipc_js.go
+++ b/rpc/ipc_js.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build js
// +build js
package rpc
diff --git a/rpc/ipc_unix.go b/rpc/ipc_unix.go
index f4690cc0abb9..249a9cf044dc 100644
--- a/rpc/ipc_unix.go
+++ b/rpc/ipc_unix.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
package rpc
diff --git a/rpc/ipc_windows.go b/rpc/ipc_windows.go
index ca56a3ce4313..adb1826f0c80 100644
--- a/rpc/ipc_windows.go
+++ b/rpc/ipc_windows.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build windows
// +build windows
package rpc
diff --git a/tests/fuzzers/bls12381/bls12381_fuzz.go b/tests/fuzzers/bls12381/bls12381_fuzz.go
index c0f452f3edd5..b283ed11fe39 100644
--- a/tests/fuzzers/bls12381/bls12381_fuzz.go
+++ b/tests/fuzzers/bls12381/bls12381_fuzz.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see .
+//go:build gofuzz
// +build gofuzz
package bls