aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-08-25 12:48:26 -0400
committerRuss Cox <rsc@golang.org>2021-10-28 18:17:57 +0000
commitf229e7031a6efb2f23241b5da000c3b3203081d6 (patch)
tree69664f4f4b37d9256133addc8f0328590b70a055 /src/crypto
parented475fe53ba41c0c15b11565f8b9d00165345bc2 (diff)
downloadgo-f229e7031a6efb2f23241b5da000c3b3203081d6.tar.gz
go-f229e7031a6efb2f23241b5da000c3b3203081d6.zip
all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor)
When these packages are released as part of Go 1.18, Go 1.16 will no longer be supported, so we can remove the +build tags in these files. Ran go fix -fix=buildtag std cmd and then reverted the bootstrapDirs as defined in src/cmd/dist/buildtool.go, which need to continue to build with Go 1.4 for now. Also reverted src/vendor and src/cmd/vendor, which will need to be updated in their own repos first. Manual changes in runtime/pprof/mprof_test.go to adjust line numbers. For #41184. Change-Id: Ic0f93f7091295b6abc76ed5cd6e6746e1280861e Reviewed-on: https://go-review.googlesource.com/c/go/+/344955 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/aes/aes_gcm.go1
-rw-r--r--src/crypto/aes/cipher_asm.go1
-rw-r--r--src/crypto/aes/cipher_generic.go1
-rw-r--r--src/crypto/aes/gcm_ppc64le.go1
-rw-r--r--src/crypto/cipher/xor_generic.go1
-rw-r--r--src/crypto/cipher/xor_ppc64x.go1
-rw-r--r--src/crypto/ecdsa/ecdsa_noasm.go1
-rw-r--r--src/crypto/ecdsa/ecdsa_s390x_test.go1
-rw-r--r--src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go1
-rw-r--r--src/crypto/ed25519/internal/edwards25519/field/fe_amd64_noasm.go1
-rw-r--r--src/crypto/ed25519/internal/edwards25519/field/fe_arm64.go1
-rw-r--r--src/crypto/ed25519/internal/edwards25519/field/fe_arm64_noasm.go1
-rw-r--r--src/crypto/elliptic/export_generate.go1
-rw-r--r--src/crypto/elliptic/fuzz_test.go1
-rw-r--r--src/crypto/elliptic/gen_p256_table.go1
-rw-r--r--src/crypto/elliptic/p256.go1
-rw-r--r--src/crypto/elliptic/p256_asm.go1
-rw-r--r--src/crypto/elliptic/p256_asm_table.go1
-rw-r--r--src/crypto/elliptic/p256_asm_table_test.go1
-rw-r--r--src/crypto/elliptic/p256_generic.go1
-rw-r--r--src/crypto/elliptic/p256_ppc64le.go1
-rw-r--r--src/crypto/elliptic/p256_s390x.go1
-rw-r--r--src/crypto/internal/subtle/aliasing.go1
-rw-r--r--src/crypto/internal/subtle/aliasing_appengine.go1
-rw-r--r--src/crypto/md5/gen.go1
-rw-r--r--src/crypto/md5/md5block_decl.go1
-rw-r--r--src/crypto/md5/md5block_generic.go1
-rw-r--r--src/crypto/rand/eagain.go1
-rw-r--r--src/crypto/rand/rand_batched.go1
-rw-r--r--src/crypto/rand/rand_batched_test.go1
-rw-r--r--src/crypto/rand/rand_getentropy.go1
-rw-r--r--src/crypto/rand/rand_js.go1
-rw-r--r--src/crypto/rand/rand_unix.go1
-rw-r--r--src/crypto/sha1/fallback_test.go1
-rw-r--r--src/crypto/sha1/issue15617_test.go2
-rw-r--r--src/crypto/sha1/sha1block_decl.go1
-rw-r--r--src/crypto/sha1/sha1block_generic.go1
-rw-r--r--src/crypto/sha256/fallback_test.go1
-rw-r--r--src/crypto/sha256/sha256block_decl.go1
-rw-r--r--src/crypto/sha256/sha256block_generic.go1
-rw-r--r--src/crypto/sha512/fallback_test.go1
-rw-r--r--src/crypto/sha512/sha512block_amd64.go1
-rw-r--r--src/crypto/sha512/sha512block_decl.go1
-rw-r--r--src/crypto/sha512/sha512block_generic.go1
-rw-r--r--src/crypto/tls/generate_cert.go1
-rw-r--r--src/crypto/tls/handshake_unix_test.go1
-rw-r--r--src/crypto/x509/internal/macos/corefoundation.go1
-rw-r--r--src/crypto/x509/internal/macos/security.go1
-rw-r--r--src/crypto/x509/root_bsd.go1
-rw-r--r--src/crypto/x509/root_darwin.go1
-rw-r--r--src/crypto/x509/root_ios.go1
-rw-r--r--src/crypto/x509/root_ios_gen.go1
-rw-r--r--src/crypto/x509/root_js.go1
-rw-r--r--src/crypto/x509/root_omit.go2
-rw-r--r--src/crypto/x509/root_omit_test.go2
-rw-r--r--src/crypto/x509/root_plan9.go1
-rw-r--r--src/crypto/x509/root_unix.go1
-rw-r--r--src/crypto/x509/root_unix_test.go1
-rw-r--r--src/crypto/x509/x509_test_import.go1
59 files changed, 0 insertions, 62 deletions
diff --git a/src/crypto/aes/aes_gcm.go b/src/crypto/aes/aes_gcm.go
index 1de0e457a2..98fb6d8e9b 100644
--- a/src/crypto/aes/aes_gcm.go
+++ b/src/crypto/aes/aes_gcm.go
@@ -3,7 +3,6 @@
// 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 4251805ef9..c948f1a579 100644
--- a/src/crypto/aes/cipher_asm.go
+++ b/src/crypto/aes/cipher_asm.go
@@ -3,7 +3,6 @@
// 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 22ce3be7f3..bff21ae54b 100644
--- a/src/crypto/aes/cipher_generic.go
+++ b/src/crypto/aes/cipher_generic.go
@@ -3,7 +3,6 @@
// 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 01b4e08757..cba6c8873f 100644
--- a/src/crypto/aes/gcm_ppc64le.go
+++ b/src/crypto/aes/gcm_ppc64le.go
@@ -3,7 +3,6 @@
// 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 03208402d7..43517a8e20 100644
--- a/src/crypto/cipher/xor_generic.go
+++ b/src/crypto/cipher/xor_generic.go
@@ -3,7 +3,6 @@
// 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 f520208a37..f81eec531d 100644
--- a/src/crypto/cipher/xor_ppc64x.go
+++ b/src/crypto/cipher/xor_ppc64x.go
@@ -3,7 +3,6 @@
// 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 68670a4f93..7fbca10b56 100644
--- a/src/crypto/ecdsa/ecdsa_noasm.go
+++ b/src/crypto/ecdsa/ecdsa_noasm.go
@@ -3,7 +3,6 @@
// 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 f5633fb8a6..fd1dc7c060 100644
--- a/src/crypto/ecdsa/ecdsa_s390x_test.go
+++ b/src/crypto/ecdsa/ecdsa_s390x_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build s390x
-// +build s390x
package ecdsa
diff --git a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
index 8fe583939f..363020bd6b 100644
--- a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
+++ b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
@@ -1,7 +1,6 @@
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
//go:build amd64 && gc && !purego
-// +build amd64,gc,!purego
package field
diff --git a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64_noasm.go b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64_noasm.go
index ddb6c9b8f7..9da280d1d8 100644
--- a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64_noasm.go
+++ b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64_noasm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !amd64 || !gc || purego
-// +build !amd64 !gc purego
package field
diff --git a/src/crypto/ed25519/internal/edwards25519/field/fe_arm64.go b/src/crypto/ed25519/internal/edwards25519/field/fe_arm64.go
index af459ef515..075fe9b925 100644
--- a/src/crypto/ed25519/internal/edwards25519/field/fe_arm64.go
+++ b/src/crypto/ed25519/internal/edwards25519/field/fe_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && gc && !purego
-// +build arm64,gc,!purego
package field
diff --git a/src/crypto/ed25519/internal/edwards25519/field/fe_arm64_noasm.go b/src/crypto/ed25519/internal/edwards25519/field/fe_arm64_noasm.go
index 234a5b2e5d..fc029ac12d 100644
--- a/src/crypto/ed25519/internal/edwards25519/field/fe_arm64_noasm.go
+++ b/src/crypto/ed25519/internal/edwards25519/field/fe_arm64_noasm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !arm64 || !gc || purego
-// +build !arm64 !gc purego
package field
diff --git a/src/crypto/elliptic/export_generate.go b/src/crypto/elliptic/export_generate.go
index 5fe3025cf8..f15b302d8c 100644
--- a/src/crypto/elliptic/export_generate.go
+++ b/src/crypto/elliptic/export_generate.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build tablegen
-// +build tablegen
package elliptic
diff --git a/src/crypto/elliptic/fuzz_test.go b/src/crypto/elliptic/fuzz_test.go
index 8ff3bf3cc2..2b5ddae1d9 100644
--- a/src/crypto/elliptic/fuzz_test.go
+++ b/src/crypto/elliptic/fuzz_test.go
@@ -3,7 +3,6 @@
// 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/gen_p256_table.go b/src/crypto/elliptic/gen_p256_table.go
index cdcddcb736..54aafa2c38 100644
--- a/src/crypto/elliptic/gen_p256_table.go
+++ b/src/crypto/elliptic/gen_p256_table.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
package main
diff --git a/src/crypto/elliptic/p256.go b/src/crypto/elliptic/p256.go
index b2b12c8f13..7747de7a50 100644
--- a/src/crypto/elliptic/p256.go
+++ b/src/crypto/elliptic/p256.go
@@ -3,7 +3,6 @@
// 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 d46b809125..ff0c1596aa 100644
--- a/src/crypto/elliptic/p256_asm.go
+++ b/src/crypto/elliptic/p256_asm.go
@@ -11,7 +11,6 @@
// https://eprint.iacr.org/2013/816.pdf
//go:build amd64 || arm64
-// +build amd64 arm64
package elliptic
diff --git a/src/crypto/elliptic/p256_asm_table.go b/src/crypto/elliptic/p256_asm_table.go
index 7f81cb6b3f..ad2c6c2c51 100644
--- a/src/crypto/elliptic/p256_asm_table.go
+++ b/src/crypto/elliptic/p256_asm_table.go
@@ -5,7 +5,6 @@
// Generated by gen_p256_table.go. DO NOT EDIT.
//go:build amd64 || arm64
-// +build amd64 arm64
package elliptic
diff --git a/src/crypto/elliptic/p256_asm_table_test.go b/src/crypto/elliptic/p256_asm_table_test.go
index d704dae299..6abd8cb11b 100644
--- a/src/crypto/elliptic/p256_asm_table_test.go
+++ b/src/crypto/elliptic/p256_asm_table_test.go
@@ -3,7 +3,6 @@
// 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_generic.go b/src/crypto/elliptic/p256_generic.go
index 25762a8f76..7f8fab5398 100644
--- a/src/crypto/elliptic/p256_generic.go
+++ b/src/crypto/elliptic/p256_generic.go
@@ -3,7 +3,6 @@
// 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 40d9ed9d40..e9a6a067a2 100644
--- a/src/crypto/elliptic/p256_ppc64le.go
+++ b/src/crypto/elliptic/p256_ppc64le.go
@@ -3,7 +3,6 @@
// 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 91e613b631..735e9f57f1 100644
--- a/src/crypto/elliptic/p256_s390x.go
+++ b/src/crypto/elliptic/p256_s390x.go
@@ -3,7 +3,6 @@
// 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 86e0f3cfe7..16e2fcab12 100644
--- a/src/crypto/internal/subtle/aliasing.go
+++ b/src/crypto/internal/subtle/aliasing.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !appengine
-// +build !appengine
// Package subtle implements functions that are often useful in cryptographic
// code but require careful thought to use correctly.
diff --git a/src/crypto/internal/subtle/aliasing_appengine.go b/src/crypto/internal/subtle/aliasing_appengine.go
index 35b442f7a2..90ac4b61cc 100644
--- a/src/crypto/internal/subtle/aliasing_appengine.go
+++ b/src/crypto/internal/subtle/aliasing_appengine.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build appengine
-// +build appengine
// Package subtle implements functions that are often useful in cryptographic
// code but require careful thought to use correctly.
diff --git a/src/crypto/md5/gen.go b/src/crypto/md5/gen.go
index 29729fad01..cd2700a5cf 100644
--- a/src/crypto/md5/gen.go
+++ b/src/crypto/md5/gen.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// This program generates md5block.go
// Invoke as
diff --git a/src/crypto/md5/md5block_decl.go b/src/crypto/md5/md5block_decl.go
index bc2d58c069..6716a0c9db 100644
--- a/src/crypto/md5/md5block_decl.go
+++ b/src/crypto/md5/md5block_decl.go
@@ -3,7 +3,6 @@
// 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 23ed75304f..c929c2b84a 100644
--- a/src/crypto/md5/md5block_generic.go
+++ b/src/crypto/md5/md5block_generic.go
@@ -3,7 +3,6 @@
// 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 85d4d9d47f..f018e75931 100644
--- a/src/crypto/rand/eagain.go
+++ b/src/crypto/rand/eagain.go
@@ -3,7 +3,6 @@
// 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 d7c5bf3562..3e8e620382 100644
--- a/src/crypto/rand/rand_batched.go
+++ b/src/crypto/rand/rand_batched.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || freebsd || dragonfly || solaris
-// +build linux freebsd dragonfly solaris
package rand
diff --git a/src/crypto/rand/rand_batched_test.go b/src/crypto/rand/rand_batched_test.go
index 2d20922c82..28e45aa689 100644
--- a/src/crypto/rand/rand_batched_test.go
+++ b/src/crypto/rand/rand_batched_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || freebsd || dragonfly || solaris
-// +build linux freebsd dragonfly solaris
package rand
diff --git a/src/crypto/rand/rand_getentropy.go b/src/crypto/rand/rand_getentropy.go
index dd725372ad..2bf2f52032 100644
--- a/src/crypto/rand/rand_getentropy.go
+++ b/src/crypto/rand/rand_getentropy.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin && !ios) || openbsd
-// +build darwin,!ios openbsd
package rand
diff --git a/src/crypto/rand/rand_js.go b/src/crypto/rand/rand_js.go
index 7ddc2b6169..91e69fae5d 100644
--- a/src/crypto/rand/rand_js.go
+++ b/src/crypto/rand/rand_js.go
@@ -3,7 +3,6 @@
// 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 81277eb6a5..40347874c5 100644
--- a/src/crypto/rand/rand_unix.go
+++ b/src/crypto/rand/rand_unix.go
@@ -3,7 +3,6 @@
// 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
// generator.
diff --git a/src/crypto/sha1/fallback_test.go b/src/crypto/sha1/fallback_test.go
index 4bb8b3324f..45d1f57d39 100644
--- a/src/crypto/sha1/fallback_test.go
+++ b/src/crypto/sha1/fallback_test.go
@@ -3,7 +3,6 @@
// 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 436f78c745..df4e28f64e 100644
--- a/src/crypto/sha1/issue15617_test.go
+++ b/src/crypto/sha1/issue15617_test.go
@@ -1,6 +1,4 @@
//go:build amd64 && (linux || darwin)
-// +build amd64
-// +build linux darwin
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/crypto/sha1/sha1block_decl.go b/src/crypto/sha1/sha1block_decl.go
index 93054efa7c..518a4b6b67 100644
--- a/src/crypto/sha1/sha1block_decl.go
+++ b/src/crypto/sha1/sha1block_decl.go
@@ -3,7 +3,6 @@
// 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 105aa31832..ba35155d0b 100644
--- a/src/crypto/sha1/sha1block_generic.go
+++ b/src/crypto/sha1/sha1block_generic.go
@@ -3,7 +3,6 @@
// 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 7ce88cbb2a..3f561aadd6 100644
--- a/src/crypto/sha256/fallback_test.go
+++ b/src/crypto/sha256/fallback_test.go
@@ -3,7 +3,6 @@
// 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 a6bb396f13..c9c1194487 100644
--- a/src/crypto/sha256/sha256block_decl.go
+++ b/src/crypto/sha256/sha256block_decl.go
@@ -3,7 +3,6 @@
// 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 0f2bf8b231..a8878c2eee 100644
--- a/src/crypto/sha256/sha256block_generic.go
+++ b/src/crypto/sha256/sha256block_generic.go
@@ -3,7 +3,6 @@
// 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 faf732670a..db5b13c38c 100644
--- a/src/crypto/sha512/fallback_test.go
+++ b/src/crypto/sha512/fallback_test.go
@@ -3,7 +3,6 @@
// 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 e2386f29ab..8da3e1473f 100644
--- a/src/crypto/sha512/sha512block_amd64.go
+++ b/src/crypto/sha512/sha512block_amd64.go
@@ -3,7 +3,6 @@
// 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 6c22f44801..c6dcdf5db6 100644
--- a/src/crypto/sha512/sha512block_decl.go
+++ b/src/crypto/sha512/sha512block_decl.go
@@ -3,7 +3,6 @@
// 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 865a7356f1..62ea237867 100644
--- a/src/crypto/sha512/sha512block_generic.go
+++ b/src/crypto/sha512/sha512block_generic.go
@@ -3,7 +3,6 @@
// 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 7ea90f8a7b..58fdd025db 100644
--- a/src/crypto/tls/generate_cert.go
+++ b/src/crypto/tls/generate_cert.go
@@ -3,7 +3,6 @@
// 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
// 'cert.pem' and 'key.pem' and will overwrite existing files.
diff --git a/src/crypto/tls/handshake_unix_test.go b/src/crypto/tls/handshake_unix_test.go
index 19fc698676..b61e7c24ef 100644
--- a/src/crypto/tls/handshake_unix_test.go
+++ b/src/crypto/tls/handshake_unix_test.go
@@ -3,7 +3,6 @@
// 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 fcfbc1e561..a91131ac98 100644
--- a/src/crypto/x509/internal/macos/corefoundation.go
+++ b/src/crypto/x509/internal/macos/corefoundation.go
@@ -3,7 +3,6 @@
// 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
// Security.framework, similarly to how package syscall provides access to
diff --git a/src/crypto/x509/internal/macos/security.go b/src/crypto/x509/internal/macos/security.go
index 0f6fa42b7b..a560248e8b 100644
--- a/src/crypto/x509/internal/macos/security.go
+++ b/src/crypto/x509/internal/macos/security.go
@@ -3,7 +3,6 @@
// 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 6712ea32a6..8ac205faa9 100644
--- a/src/crypto/x509/root_bsd.go
+++ b/src/crypto/x509/root_bsd.go
@@ -3,7 +3,6 @@
// 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 05593bb105..164ad9dc77 100644
--- a/src/crypto/x509/root_darwin.go
+++ b/src/crypto/x509/root_darwin.go
@@ -3,7 +3,6 @@
// 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 9bc62f8abb..c5e3fc0b72 100644
--- a/src/crypto/x509/root_ios.go
+++ b/src/crypto/x509/root_ios.go
@@ -2,7 +2,6 @@
// Update the version in root.go and regenerate with "go generate".
//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 3c98de5bb6..15eb1592ca 100644
--- a/src/crypto/x509/root_ios_gen.go
+++ b/src/crypto/x509/root_ios_gen.go
@@ -3,7 +3,6 @@
// 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 f2c2c0af38..9593038517 100644
--- a/src/crypto/x509/root_js.go
+++ b/src/crypto/x509/root_js.go
@@ -3,7 +3,6 @@
// 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 81f2f112d0..299d74835e 100644
--- a/src/crypto/x509/root_omit.go
+++ b/src/crypto/x509/root_omit.go
@@ -3,8 +3,6 @@
// 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
// This file provides the loadSystemRoots func when the
// "x509omitbundledroots" build tag has disabled bundling a copy,
diff --git a/src/crypto/x509/root_omit_test.go b/src/crypto/x509/root_omit_test.go
index 158bd7f91a..1709e2ea8b 100644
--- a/src/crypto/x509/root_omit_test.go
+++ b/src/crypto/x509/root_omit_test.go
@@ -3,8 +3,6 @@
// 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
package x509
diff --git a/src/crypto/x509/root_plan9.go b/src/crypto/x509/root_plan9.go
index 2bdb2fe713..3bd06fe50d 100644
--- a/src/crypto/x509/root_plan9.go
+++ b/src/crypto/x509/root_plan9.go
@@ -3,7 +3,6 @@
// 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 dede825edd..aa54f891ca 100644
--- a/src/crypto/x509/root_unix.go
+++ b/src/crypto/x509/root_unix.go
@@ -3,7 +3,6 @@
// 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 7118f12d74..7197a0de3b 100644
--- a/src/crypto/x509/root_unix_test.go
+++ b/src/crypto/x509/root_unix_test.go
@@ -3,7 +3,6 @@
// 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 ef3ee807bf..2474e3d810 100644
--- a/src/crypto/x509/x509_test_import.go
+++ b/src/crypto/x509/x509_test_import.go
@@ -3,7 +3,6 @@
// 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
// imports can sign certificates without errors resulting from missing hash