diff options
| author | Russ Cox <rsc@golang.org> | 2021-02-19 18:54:42 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-02-20 03:31:48 +0000 |
| commit | 5ea612d1eb830b38bc4e914e37f55311eb58adce (patch) | |
| tree | 273a278dab6c87b85e66b858f564b0bc8a33ba5b | |
| parent | b8e89b74b9df40d0d1cd96f441924c545d8d0dea (diff) | |
| download | go-x-crypto-5ea612d1eb830b38bc4e914e37f55311eb58adce.tar.xz | |
all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I70526bf588bf4078887e567795867ece785d666b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/294415
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
53 files changed, 54 insertions, 1 deletions
diff --git a/acme/version_go112.go b/acme/version_go112.go index b58f245..b9efdb5 100644 --- a/acme/version_go112.go +++ b/acme/version_go112.go @@ -2,6 +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.12 // +build go1.12 package acme diff --git a/argon2/blamka_amd64.go b/argon2/blamka_amd64.go index 1108e11..a014ac9 100644 --- a/argon2/blamka_amd64.go +++ b/argon2/blamka_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 && gc && !purego // +build amd64,gc,!purego package argon2 diff --git a/argon2/blamka_ref.go b/argon2/blamka_ref.go index 4a963c7..167c59d 100644 --- a/argon2/blamka_ref.go +++ b/argon2/blamka_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 || purego || !gc // +build !amd64 purego !gc package argon2 diff --git a/blake2b/blake2bAVX2_amd64.go b/blake2b/blake2bAVX2_amd64.go index 8a893fd..56bfaaa 100644 --- a/blake2b/blake2bAVX2_amd64.go +++ b/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 && gc && !purego // +build go1.7,amd64,gc,!purego package blake2b diff --git a/blake2b/blake2b_amd64.go b/blake2b/blake2b_amd64.go index a52c887..5fa1b32 100644 --- a/blake2b/blake2b_amd64.go +++ b/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 && gc && !purego // +build !go1.7,amd64,gc,!purego package blake2b diff --git a/blake2b/blake2b_ref.go b/blake2b/blake2b_ref.go index 8597457..b0137cd 100644 --- a/blake2b/blake2b_ref.go +++ b/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 || purego || !gc // +build !amd64 purego !gc package blake2b diff --git a/blake2b/register.go b/blake2b/register.go index efd689a..9d86339 100644 --- a/blake2b/register.go +++ b/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/blake2s/blake2s_386.go b/blake2s/blake2s_386.go index 2d8ee63..b4463fb 100644 --- a/blake2s/blake2s_386.go +++ b/blake2s/blake2s_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 && gc && !purego // +build 386,gc,!purego package blake2s diff --git a/blake2s/blake2s_amd64.go b/blake2s/blake2s_amd64.go index 267bdce..becdaa1 100644 --- a/blake2s/blake2s_amd64.go +++ b/blake2s/blake2s_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 && gc && !purego // +build amd64,gc,!purego package blake2s diff --git a/blake2s/blake2s_ref.go b/blake2s/blake2s_ref.go index 94ef01d..799dba0 100644 --- a/blake2s/blake2s_ref.go +++ b/blake2s/blake2s_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 && !386) || !gc || purego // +build !amd64,!386 !gc purego package blake2s diff --git a/blake2s/register.go b/blake2s/register.go index d277459..ef79ff3 100644 --- a/blake2s/register.go +++ b/blake2s/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 blake2s diff --git a/chacha20/chacha_arm64.go b/chacha20/chacha_arm64.go index c474e5a..94c71ac 100644 --- a/chacha20/chacha_arm64.go +++ b/chacha20/chacha_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 go1.11 && gc && !purego // +build go1.11,gc,!purego package chacha20 diff --git a/chacha20/chacha_noasm.go b/chacha20/chacha_noasm.go index 3e8a609..025b498 100644 --- a/chacha20/chacha_noasm.go +++ b/chacha20/chacha_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 (!arm64 && !s390x && !ppc64le) || (arm64 && !go1.11) || !gc || purego // +build !arm64,!s390x,!ppc64le arm64,!go1.11 !gc purego package chacha20 diff --git a/chacha20/chacha_ppc64le.go b/chacha20/chacha_ppc64le.go index 2806c63..da420b2 100644 --- a/chacha20/chacha_ppc64le.go +++ b/chacha20/chacha_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 gc && !purego // +build gc,!purego package chacha20 diff --git a/chacha20/chacha_s390x.go b/chacha20/chacha_s390x.go index a0774dd..c5898db 100644 --- a/chacha20/chacha_s390x.go +++ b/chacha20/chacha_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 gc && !purego // +build gc,!purego package chacha20 diff --git a/chacha20poly1305/chacha20poly1305_amd64.go b/chacha20poly1305/chacha20poly1305_amd64.go index c41d061..25959b9 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.go +++ b/chacha20poly1305/chacha20poly1305_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 gc && !purego // +build gc,!purego package chacha20poly1305 diff --git a/chacha20poly1305/chacha20poly1305_noasm.go b/chacha20poly1305/chacha20poly1305_noasm.go index 13941c4..f832b33 100644 --- a/chacha20poly1305/chacha20poly1305_noasm.go +++ b/chacha20poly1305/chacha20poly1305_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 !amd64 || !gc || purego // +build !amd64 !gc purego package chacha20poly1305 diff --git a/curve25519/curve25519_amd64.go b/curve25519/curve25519_amd64.go index 877b6de..8485848 100644 --- a/curve25519/curve25519_amd64.go +++ b/curve25519/curve25519_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 && gc && !purego // +build amd64,gc,!purego package curve25519 diff --git a/curve25519/curve25519_noasm.go b/curve25519/curve25519_noasm.go index 80d3300..259728a 100644 --- a/curve25519/curve25519_noasm.go +++ b/curve25519/curve25519_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 !amd64 || !gc || purego // +build !amd64 !gc purego package curve25519 diff --git a/ed25519/ed25519.go b/ed25519/ed25519.go index c7f8c7e..71ad917 100644 --- a/ed25519/ed25519.go +++ b/ed25519/ed25519.go @@ -5,6 +5,7 @@ // In Go 1.13, the ed25519 package was promoted to the standard library as // crypto/ed25519, and this package became a wrapper for the standard library one. // +//go:build !go1.13 // +build !go1.13 // Package ed25519 implements the Ed25519 signature algorithm. See diff --git a/ed25519/ed25519_go113.go b/ed25519/ed25519_go113.go index d1448d8..b5974dc 100644 --- a/ed25519/ed25519_go113.go +++ b/ed25519/ed25519_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 ed25519 implements the Ed25519 signature algorithm. See diff --git a/ed25519/go113_test.go b/ed25519/go113_test.go index 76edde0..7a3912f 100644 --- a/ed25519/go113_test.go +++ b/ed25519/go113_test.go @@ -2,6 +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 ed25519_test diff --git a/internal/subtle/aliasing.go b/internal/subtle/aliasing.go index 281c27e..4fad24f 100644 --- a/internal/subtle/aliasing.go +++ b/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 !purego // +build !purego // Package subtle implements functions that are often useful in cryptographic diff --git a/internal/subtle/aliasing_purego.go b/internal/subtle/aliasing_purego.go index e20a296..80ccbed 100644 --- a/internal/subtle/aliasing_purego.go +++ b/internal/subtle/aliasing_purego.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego // +build purego // Package subtle implements functions that are often useful in cryptographic diff --git a/internal/wycheproof/ecdsa_compat_test.go b/internal/wycheproof/ecdsa_compat_test.go index 8edc10b..5880fb3 100644 --- a/internal/wycheproof/ecdsa_compat_test.go +++ b/internal/wycheproof/ecdsa_compat_test.go @@ -2,6 +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.15 // +build !go1.15 // ecdsa.VerifyASN1 was added in Go 1.15. diff --git a/internal/wycheproof/ecdsa_go115_test.go b/internal/wycheproof/ecdsa_go115_test.go index 8da3be5..e13e709 100644 --- a/internal/wycheproof/ecdsa_go115_test.go +++ b/internal/wycheproof/ecdsa_go115_test.go @@ -2,6 +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.15 // +build go1.15 package wycheproof diff --git a/internal/wycheproof/eddsa_test.go b/internal/wycheproof/eddsa_test.go index 06c9829..0a7fbb7 100644 --- a/internal/wycheproof/eddsa_test.go +++ b/internal/wycheproof/eddsa_test.go @@ -2,6 +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 wycheproof diff --git a/ocsp/ocsp_test.go b/ocsp/ocsp_test.go index 70b1976..a6f7c48 100644 --- a/ocsp/ocsp_test.go +++ b/ocsp/ocsp_test.go @@ -2,6 +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 ocsp diff --git a/poly1305/bits_compat.go b/poly1305/bits_compat.go index 157a69f..45b5c96 100644 --- a/poly1305/bits_compat.go +++ b/poly1305/bits_compat.go @@ -2,6 +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 poly1305 diff --git a/poly1305/bits_go1.13.go b/poly1305/bits_go1.13.go index a0a185f..ed52b34 100644 --- a/poly1305/bits_go1.13.go +++ b/poly1305/bits_go1.13.go @@ -2,6 +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 poly1305 diff --git a/poly1305/mac_noasm.go b/poly1305/mac_noasm.go index af6c94f..f184b67 100644 --- a/poly1305/mac_noasm.go +++ b/poly1305/mac_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 (!amd64 && !ppc64le && !s390x) || !gc || purego // +build !amd64,!ppc64le,!s390x !gc purego package poly1305 diff --git a/poly1305/sum_amd64.go b/poly1305/sum_amd64.go index cf3a69e..6d52233 100644 --- a/poly1305/sum_amd64.go +++ b/poly1305/sum_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 gc && !purego // +build gc,!purego package poly1305 diff --git a/poly1305/sum_ppc64le.go b/poly1305/sum_ppc64le.go index cb4b718..4a06994 100644 --- a/poly1305/sum_ppc64le.go +++ b/poly1305/sum_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 gc && !purego // +build gc,!purego package poly1305 diff --git a/poly1305/sum_s390x.go b/poly1305/sum_s390x.go index 188a665..62cc9f8 100644 --- a/poly1305/sum_s390x.go +++ b/poly1305/sum_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 gc && !purego // +build gc,!purego package poly1305 diff --git a/salsa20/salsa/salsa20_amd64.go b/salsa20/salsa/salsa20_amd64.go index 5cf1d6d..c400dfc 100644 --- a/salsa20/salsa/salsa20_amd64.go +++ b/salsa20/salsa/salsa20_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 && !purego && gc // +build amd64,!purego,gc package salsa diff --git a/salsa20/salsa/salsa20_amd64_test.go b/salsa20/salsa/salsa20_amd64_test.go index a9cb697..fc781f7 100644 --- a/salsa20/salsa/salsa20_amd64_test.go +++ b/salsa20/salsa/salsa20_amd64_test.go @@ -2,6 +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 && !purego && gc // +build amd64,!purego,gc package salsa diff --git a/salsa20/salsa/salsa20_noasm.go b/salsa20/salsa/salsa20_noasm.go index 24f03c1..4392cc1 100644 --- a/salsa20/salsa/salsa20_noasm.go +++ b/salsa20/salsa/salsa20_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 !amd64 || purego || !gc // +build !amd64 purego !gc package salsa diff --git a/sha3/hashes_generic.go b/sha3/hashes_generic.go index fac0c0e..c74fc20 100644 --- a/sha3/hashes_generic.go +++ b/sha3/hashes_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 !gc || purego || !s390x // +build !gc purego !s390x package sha3 diff --git a/sha3/keccakf.go b/sha3/keccakf.go index 92b63a3..0f4ae8b 100644 --- a/sha3/keccakf.go +++ b/sha3/keccakf.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 purego !gc +//go:build !amd64 || purego || !gc +// +build !amd64 purego !gc package sha3 diff --git a/sha3/keccakf_amd64.go b/sha3/keccakf_amd64.go index 3e3e760..248a382 100644 --- a/sha3/keccakf_amd64.go +++ b/sha3/keccakf_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 && !purego && gc // +build amd64,!purego,gc package sha3 diff --git a/sha3/register.go b/sha3/register.go index 3cf6a22..8b4453a 100644 --- a/sha3/register.go +++ b/sha3/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.4 // +build go1.4 package sha3 diff --git a/sha3/sha3_s390x.go b/sha3/sha3_s390x.go index 485e2d5..4fcfc92 100644 --- a/sha3/sha3_s390x.go +++ b/sha3/sha3_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 gc && !purego // +build gc,!purego package sha3 diff --git a/sha3/shake_generic.go b/sha3/shake_generic.go index 68148f2..5c0710e 100644 --- a/sha3/shake_generic.go +++ b/sha3/shake_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 !gc || purego || !s390x // +build !gc purego !s390x package sha3 diff --git a/sha3/xor.go b/sha3/xor.go index ddafa82..59c8eb9 100644 --- a/sha3/xor.go +++ b/sha3/xor.go @@ -2,6 +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 && !ppc64le) || purego // +build !amd64,!386,!ppc64le purego package sha3 diff --git a/sha3/xor_unaligned.go b/sha3/xor_unaligned.go index 6249ad8..1ce6062 100644 --- a/sha3/xor_unaligned.go +++ b/sha3/xor_unaligned.go @@ -2,6 +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 || ppc64le) && !purego // +build amd64 386 ppc64le // +build !purego diff --git a/ssh/test/agent_unix_test.go b/ssh/test/agent_unix_test.go index 5d320d0..9df2b4e 100644 --- a/ssh/test/agent_unix_test.go +++ b/ssh/test/agent_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 test diff --git a/ssh/test/banner_test.go b/ssh/test/banner_test.go index c3f0a08..f149d6d 100644 --- a/ssh/test/banner_test.go +++ b/ssh/test/banner_test.go @@ -2,6 +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 test diff --git a/ssh/test/cert_test.go b/ssh/test/cert_test.go index 84ac31e..8506e4b 100644 --- a/ssh/test/cert_test.go +++ b/ssh/test/cert_test.go @@ -2,6 +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 test diff --git a/ssh/test/dial_unix_test.go b/ssh/test/dial_unix_test.go index 8e1362c..15c34d9 100644 --- a/ssh/test/dial_unix_test.go +++ b/ssh/test/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 !windows && !solaris && !js // +build !windows,!solaris,!js package test diff --git a/ssh/test/forward_unix_test.go b/ssh/test/forward_unix_test.go index 4c44e57..ab8e639 100644 --- a/ssh/test/forward_unix_test.go +++ b/ssh/test/forward_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 test diff --git a/ssh/test/multi_auth_test.go b/ssh/test/multi_auth_test.go index f594d36..da8f674 100644 --- a/ssh/test/multi_auth_test.go +++ b/ssh/test/multi_auth_test.go @@ -14,6 +14,7 @@ // not exist these tests will be skipped. See compile instructions // (for linux) in file ./sshd_test_pw.c. +//go:build linux // +build linux package test diff --git a/ssh/test/session_test.go b/ssh/test/session_test.go index e363869..d66509b 100644 --- a/ssh/test/session_test.go +++ b/ssh/test/session_test.go @@ -2,6 +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 && !solaris && !js // +build !windows,!solaris,!js package test diff --git a/ssh/test/test_unix_test.go b/ssh/test/test_unix_test.go index cf62d42..dbd02c7 100644 --- a/ssh/test/test_unix_test.go +++ b/ssh/test/test_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 || plan9 // +build aix darwin dragonfly freebsd linux netbsd openbsd plan9 package test |
