Skip to content

Commit

Permalink
all: add go:build lines (ethereum#23468)
Browse files Browse the repository at this point in the history
Generated by go1.17 fmt ./...
  • Loading branch information
fjl authored Aug 25, 2021
1 parent 887902e commit 8a13401
Show file tree
Hide file tree
Showing 59 changed files with 66 additions and 10 deletions.
1 change: 1 addition & 0 deletions accounts/keystore/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

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

package keystore
Expand Down
1 change: 1 addition & 0 deletions accounts/keystore/watch_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//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.
Expand Down
1 change: 1 addition & 0 deletions cmd/utils/diskusage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !windows && !openbsd
// +build !windows,!openbsd

package utils
Expand Down
1 change: 1 addition & 0 deletions cmd/utils/diskusage_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build openbsd
// +build openbsd

package utils
Expand Down
1 change: 1 addition & 0 deletions common/fdlimit/fdlimit_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build freebsd || dragonfly
// +build freebsd dragonfly

package fdlimit
Expand Down
1 change: 1 addition & 0 deletions common/fdlimit/fdlimit_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build linux || netbsd || openbsd || solaris
// +build linux netbsd openbsd solaris

package fdlimit
Expand Down
1 change: 1 addition & 0 deletions core/mkalloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build none
// +build none

/*
Expand Down
1 change: 1 addition & 0 deletions crypto/blake2b/blake2bAVX2_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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
Expand Down
1 change: 1 addition & 0 deletions crypto/blake2b/blake2b_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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
Expand Down
1 change: 1 addition & 0 deletions crypto/blake2b/blake2b_f_fuzz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build gofuzz
// +build gofuzz

package blake2b
Expand Down
1 change: 1 addition & 0 deletions crypto/blake2b/blake2b_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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
Expand Down
1 change: 1 addition & 0 deletions crypto/blake2b/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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
Expand Down
1 change: 1 addition & 0 deletions crypto/bls12381/arithmetic_decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

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

package bls12381
Expand Down
1 change: 1 addition & 0 deletions crypto/bls12381/arithmetic_fallback.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crypto/bls12381/arithmetic_x86_adx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build amd64 && blsadx
// +build amd64,blsadx

package bls12381
Expand Down
1 change: 1 addition & 0 deletions crypto/bls12381/arithmetic_x86_noadx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build amd64 && blsasm
// +build amd64,blsasm

package bls12381
Expand Down
1 change: 1 addition & 0 deletions crypto/bn256/bn256_fast.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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.
Expand Down
1 change: 1 addition & 0 deletions crypto/bn256/bn256_slow.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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.
Expand Down
1 change: 1 addition & 0 deletions crypto/bn256/cloudflare/gfp_decl.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && !generic) || (arm64 && !generic)
// +build amd64,!generic arm64,!generic

package bn256
Expand Down
1 change: 1 addition & 0 deletions crypto/bn256/cloudflare/gfp_generic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (!amd64 && !arm64) || generic
// +build !amd64,!arm64 generic

package bn256
Expand Down
1 change: 1 addition & 0 deletions crypto/secp256k1/dummy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build dummy
// +build dummy

// This file is part of a workaround for `go mod vendor` which won't vendor
Expand Down
4 changes: 2 additions & 2 deletions crypto/secp256k1/panic_cb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions crypto/secp256k1/scalar_mult_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions crypto/secp256k1/scalar_mult_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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
Expand Down
4 changes: 2 additions & 2 deletions crypto/secp256k1/secp256.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions crypto/signature_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

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

package crypto
Expand Down
1 change: 1 addition & 0 deletions crypto/signature_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build nacl || js || !cgo || gofuzz
// +build nacl js !cgo gofuzz

package crypto
Expand Down
1 change: 1 addition & 0 deletions crypto/signify/signify_fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build gofuzz
// +build gofuzz

package signify
Expand Down
1 change: 1 addition & 0 deletions ethdb/leveldb/leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !js
// +build !js

// Package leveldb implements the key-value database layer based on LevelDB.
Expand Down
1 change: 1 addition & 0 deletions internal/debug/loudpanic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build go1.6
// +build go1.6

package debug
Expand Down
1 change: 1 addition & 0 deletions internal/debug/loudpanic_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !go1.6
// +build !go1.6

package debug
Expand Down
3 changes: 2 additions & 1 deletion internal/debug/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//+build go1.5
//go:build go1.5
// +build go1.5

package debug

Expand Down
3 changes: 2 additions & 1 deletion internal/debug/trace_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//+build !go1.5
//go:build !go1.5
// +build !go1.5

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

Expand Down
1 change: 1 addition & 0 deletions log/handler_go13.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.4
// +build !go1.4

package log
Expand Down
1 change: 1 addition & 0 deletions log/handler_go14.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.4
// +build go1.4

package log
Expand Down
1 change: 1 addition & 0 deletions log/syslog.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows && !plan9
// +build !windows,!plan9

package log
Expand Down
1 change: 1 addition & 0 deletions metrics/cpu_disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build ios || js
// +build ios js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/cpu_enabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !ios && !js
// +build !ios,!js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/cputime_nop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build windows || js
// +build windows js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/cputime_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !windows && !js
// +build !windows,!js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/disk_nop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !linux
// +build !linux

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/runtime_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build cgo && !appengine && !js
// +build cgo,!appengine,!js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/runtime_gccpufraction.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.5
// +build go1.5

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/runtime_no_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !cgo || appengine || js
// +build !cgo appengine js

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/runtime_no_gccpufraction.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.5
// +build !go1.5

package metrics
Expand Down
1 change: 1 addition & 0 deletions metrics/syslog.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package metrics
Expand Down
1 change: 1 addition & 0 deletions mobile/geth_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build android
// +build android

package geth
Expand Down
1 change: 1 addition & 0 deletions mobile/geth_ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build ios
// +build ios

package geth
Expand Down
1 change: 1 addition & 0 deletions mobile/geth_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build !android && !ios
// +build !android,!ios

package geth
Expand Down
3 changes: 2 additions & 1 deletion p2p/netutil/toobig_notwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//+build !windows
//go:build !windows
// +build !windows

package netutil

Expand Down
3 changes: 2 additions & 1 deletion p2p/netutil/toobig_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//+build windows
//go:build windows
// +build windows

package netutil

Expand Down
1 change: 1 addition & 0 deletions rlp/safe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.

//go:build nacl || js || !cgo
// +build nacl js !cgo

package rlp
Expand Down
Loading

0 comments on commit 8a13401

Please sign in to comment.