Skip to content

Commit 8a13401

Browse files
authored
all: add go:build lines (ethereum#23468)
Generated by go1.17 fmt ./...
1 parent 887902e commit 8a13401

Some content is hidden

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

59 files changed

+66
-10
lines changed

accounts/keystore/watch.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build (darwin && !ios && cgo) || freebsd || (linux && !arm64) || netbsd || solaris
1718
// +build darwin,!ios,cgo freebsd linux,!arm64 netbsd solaris
1819

1920
package keystore

accounts/keystore/watch_fallback.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build (darwin && !cgo) || ios || (linux && arm64) || windows || (!darwin && !freebsd && !linux && !netbsd && !solaris)
1718
// +build darwin,!cgo ios linux,arm64 windows !darwin,!freebsd,!linux,!netbsd,!solaris
1819

1920
// This is the fallback implementation of directory watching.

cmd/utils/diskusage.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !windows && !openbsd
1718
// +build !windows,!openbsd
1819

1920
package utils

cmd/utils/diskusage_openbsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build openbsd
1718
// +build openbsd
1819

1920
package utils

common/fdlimit/fdlimit_bsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build freebsd || dragonfly
1718
// +build freebsd dragonfly
1819

1920
package fdlimit

common/fdlimit/fdlimit_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build linux || netbsd || openbsd || solaris
1718
// +build linux netbsd openbsd solaris
1819

1920
package fdlimit

core/mkalloc.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build none
1718
// +build none
1819

1920
/*

crypto/blake2b/blake2bAVX2_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.7 && amd64 && !gccgo && !appengine
56
// +build go1.7,amd64,!gccgo,!appengine
67

78
package blake2b

crypto/blake2b/blake2b_amd64.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !go1.7 && amd64 && !gccgo && !appengine
56
// +build !go1.7,amd64,!gccgo,!appengine
67

78
package blake2b

crypto/blake2b/blake2b_f_fuzz.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build gofuzz
12
// +build gofuzz
23

34
package blake2b

crypto/blake2b/blake2b_ref.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !amd64 || appengine || gccgo
56
// +build !amd64 appengine gccgo
67

78
package blake2b

crypto/blake2b/register.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.9
56
// +build go1.9
67

78
package blake2b

crypto/bls12381/arithmetic_decl.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build (amd64 && blsasm) || (amd64 && blsadx)
1718
// +build amd64,blsasm amd64,blsadx
1819

1920
package bls12381

crypto/bls12381/arithmetic_fallback.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crypto/bls12381/arithmetic_x86_adx.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build amd64 && blsadx
1718
// +build amd64,blsadx
1819

1920
package bls12381

crypto/bls12381/arithmetic_x86_noadx.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build amd64 && blsasm
1718
// +build amd64,blsasm
1819

1920
package bls12381

crypto/bn256/bn256_fast.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be found
33
// in the LICENSE file.
44

5+
//go:build amd64 || arm64
56
// +build amd64 arm64
67

78
// Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.

crypto/bn256/bn256_slow.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be found
33
// in the LICENSE file.
44

5+
//go:build !amd64 && !arm64
56
// +build !amd64,!arm64
67

78
// Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.

crypto/bn256/cloudflare/gfp_decl.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build (amd64 && !generic) || (arm64 && !generic)
12
// +build amd64,!generic arm64,!generic
23

34
package bn256

crypto/bn256/cloudflare/gfp_generic.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build (!amd64 && !arm64) || generic
12
// +build !amd64,!arm64 generic
23

34
package bn256

crypto/secp256k1/dummy.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build dummy
12
// +build dummy
23

34
// This file is part of a workaround for `go mod vendor` which won't vendor

crypto/secp256k1/panic_cb.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be found in
33
// the LICENSE file.
44

5-
// +build !gofuzz
6-
// +build cgo
5+
//go:build !gofuzz && cgo
6+
// +build !gofuzz,cgo
77

88
package secp256k1
99

crypto/secp256k1/scalar_mult_cgo.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be found in
33
// the LICENSE file.
44

5-
// +build !gofuzz
6-
// +build cgo
5+
//go:build !gofuzz && cgo
6+
// +build !gofuzz,cgo
77

88
package secp256k1
99

crypto/secp256k1/scalar_mult_nocgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be found in
33
// the LICENSE file.
44

5+
//go:build gofuzz || !cgo
56
// +build gofuzz !cgo
67

78
package secp256k1

crypto/secp256k1/secp256.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be found in
33
// the LICENSE file.
44

5-
// +build !gofuzz
6-
// +build cgo
5+
//go:build !gofuzz && cgo
6+
// +build !gofuzz,cgo
77

88
// Package secp256k1 wraps the bitcoin secp256k1 C library.
99
package secp256k1

crypto/signature_cgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !nacl && !js && cgo && !gofuzz
1718
// +build !nacl,!js,cgo,!gofuzz
1819

1920
package crypto

crypto/signature_nocgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build nacl || js || !cgo || gofuzz
1718
// +build nacl js !cgo gofuzz
1819

1920
package crypto

crypto/signify/signify_fuzz.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build gofuzz
1718
// +build gofuzz
1819

1920
package signify

ethdb/leveldb/leveldb.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !js
1718
// +build !js
1819

1920
// Package leveldb implements the key-value database layer based on LevelDB.

internal/debug/loudpanic.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build go1.6
1718
// +build go1.6
1819

1920
package debug

internal/debug/loudpanic_fallback.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !go1.6
1718
// +build !go1.6
1819

1920
package debug

internal/debug/trace.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//+build go1.5
17+
//go:build go1.5
18+
// +build go1.5
1819

1920
package debug
2021

internal/debug/trace_fallback.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//+build !go1.5
17+
//go:build !go1.5
18+
// +build !go1.5
1819

1920
// no-op implementation of tracing methods for Go < 1.5.
2021

log/handler_go13.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !go1.4
12
// +build !go1.4
23

34
package log

log/handler_go14.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.4
12
// +build go1.4
23

34
package log

log/syslog.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows && !plan9
12
// +build !windows,!plan9
23

34
package log

metrics/cpu_disabled.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build ios || js
1718
// +build ios js
1819

1920
package metrics

metrics/cpu_enabled.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !ios && !js
1718
// +build !ios,!js
1819

1920
package metrics

metrics/cputime_nop.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build windows || js
1718
// +build windows js
1819

1920
package metrics

metrics/cputime_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !windows && !js
1718
// +build !windows,!js
1819

1920
package metrics

metrics/disk_nop.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !linux
1718
// +build !linux
1819

1920
package metrics

metrics/runtime_cgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build cgo && !appengine && !js
12
// +build cgo,!appengine,!js
23

34
package metrics

metrics/runtime_gccpufraction.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.5
12
// +build go1.5
23

34
package metrics

metrics/runtime_no_cgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !cgo || appengine || js
12
// +build !cgo appengine js
23

34
package metrics

metrics/runtime_no_gccpufraction.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !go1.5
12
// +build !go1.5
23

34
package metrics

metrics/syslog.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows
12
// +build !windows
23

34
package metrics

mobile/geth_android.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build android
1718
// +build android
1819

1920
package geth

mobile/geth_ios.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build ios
1718
// +build ios
1819

1920
package geth

mobile/geth_other.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build !android && !ios
1718
// +build !android,!ios
1819

1920
package geth

p2p/netutil/toobig_notwindows.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//+build !windows
17+
//go:build !windows
18+
// +build !windows
1819

1920
package netutil
2021

p2p/netutil/toobig_windows.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//+build windows
17+
//go:build windows
18+
// +build windows
1819

1920
package netutil
2021

rlp/safe.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//go:build nacl || js || !cgo
1718
// +build nacl js !cgo
1819

1920
package rlp

0 commit comments

Comments
 (0)