Skip to content

Commit f229e70

Browse files
committed
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 <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent ed475fe commit f229e70

File tree

834 files changed

+9
-941
lines changed

Some content is hidden

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

834 files changed

+9
-941
lines changed

src/archive/tar/stat_actime1.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || linux || dragonfly || openbsd || solaris
6-
// +build aix linux dragonfly openbsd solaris
76

87
package tar
98

src/archive/tar/stat_actime2.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build darwin || freebsd || netbsd
6-
// +build darwin freebsd netbsd
76

87
package tar
98

src/archive/tar/stat_unix.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris
6-
// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris
76

87
package tar
98

src/bytes/boundary_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44
//
55
//go:build linux
6-
// +build linux
76

87
package bytes_test
98

src/cmd/api/run.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
// The run program is invoked via the dist tool.
98
// To invoke manually: go tool dist test -run api --no-rebuild

src/cmd/go/go11.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build go1.1
6-
// +build go1.1
76

87
package main
98

src/cmd/go/go_unix_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6-
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
76

87
package main_test
98

src/cmd/go/internal/base/signal_notunix.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build plan9 || windows
6-
// +build plan9 windows
76

87
package base
98

src/cmd/go/internal/base/signal_unix.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris
6-
// +build aix darwin dragonfly freebsd js linux netbsd openbsd solaris
76

87
package base
98

src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || (solaris && !illumos)
6-
// +build aix solaris,!illumos
76

87
// This code implements the filelock API using POSIX 'fcntl' locks, which attach
98
// to an (inode, process) pair rather than a file descriptor. To avoid unlocking

src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris && !windows
6-
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!plan9,!solaris,!windows
76

87
package filelock
98

src/cmd/go/internal/lockedfile/internal/filelock/filelock_plan9.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build plan9
6-
// +build plan9
76

87
package filelock
98

src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !js && !plan9
6-
// +build !js,!plan9
76

87
package filelock_test
98

src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd
6-
// +build darwin dragonfly freebsd illumos linux netbsd openbsd
76

87
package filelock
98

src/cmd/go/internal/lockedfile/internal/filelock/filelock_windows.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build windows
6-
// +build windows
76

87
package filelock
98

src/cmd/go/internal/lockedfile/lockedfile_filelock.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !plan9
6-
// +build !plan9
76

87
package lockedfile
98

src/cmd/go/internal/lockedfile/lockedfile_plan9.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build plan9
6-
// +build plan9
76

87
package lockedfile
98

src/cmd/go/internal/lockedfile/lockedfile_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// js does not support inter-process file locking.
66
//go:build !js
7-
// +build !js
87

98
package lockedfile_test
109

src/cmd/go/internal/lockedfile/transform_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// js does not support inter-process file locking.
66
//go:build !js
7-
// +build !js
87

98
package lockedfile_test
109

src/cmd/go/internal/modfetch/bootstrap.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cmd_go_bootstrap
6-
// +build cmd_go_bootstrap
76

87
package modfetch
98

src/cmd/go/internal/modfetch/codehost/shell.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
// Interactive debugging shell for codehost.Repo implementations.
98

src/cmd/go/internal/modfetch/sumdb.go

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Go checksum database lookup
66

77
//go:build !cmd_go_bootstrap
8-
// +build !cmd_go_bootstrap
98

109
package modfetch
1110

src/cmd/go/internal/modload/stat_openfile.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build (js && wasm) || plan9
6-
// +build js,wasm plan9
76

87
// On plan9, per http://9p.io/magic/man2html/2/access: “Since file permissions
98
// are checked by the server and group information is not known to the client,

src/cmd/go/internal/modload/stat_unix.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6-
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
76

87
package modload
98

src/cmd/go/internal/modload/stat_windows.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build windows
6-
// +build windows
76

87
package modload
98

src/cmd/go/internal/robustio/robustio_flaky.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build windows || darwin
6-
// +build windows darwin
76

87
package robustio
98

src/cmd/go/internal/robustio/robustio_other.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !windows && !darwin
6-
// +build !windows,!darwin
76

87
package robustio
98

src/cmd/go/internal/test/genflags.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
package main
98

src/cmd/go/internal/web/bootstrap.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cmd_go_bootstrap
6-
// +build cmd_go_bootstrap
76

87
// This code is compiled only into the bootstrap 'go' binary.
98
// These stubs avoid importing packages with large dependency

src/cmd/go/internal/web/http.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !cmd_go_bootstrap
6-
// +build !cmd_go_bootstrap
76

87
// This code is compiled into the real 'go' binary, but it is not
98
// compiled into the binary that is built during all.bash, so as

src/cmd/go/internal/web/url_other.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !windows
6-
// +build !windows
76

87
package web
98

src/cmd/go/internal/web/url_other_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !windows
6-
// +build !windows
76

87
package web
98

src/cmd/go/internal/work/testgo.go

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// This file contains extra hooks for testing the go command.
66

77
//go:build testgo
8-
// +build testgo
98

109
package work
1110

src/cmd/go/stop_other_test.go

-9
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !(aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris)
6-
// +build !aix
7-
// +build !darwin
8-
// +build !dragonfly
9-
// +build !freebsd
10-
// +build !js !wasm
11-
// +build !linux
12-
// +build !netbsd
13-
// +build !openbsd
14-
// +build !solaris
156

167
package main_test
178

src/cmd/go/stop_unix_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
6-
// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
76

87
package main_test
98

src/cmd/nm/nm_cgo_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package main
98

src/cmd/pprof/readlineui.go

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
// that provides the readline functionality if possible.
77

88
//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows) && !appengine && !android
9-
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
10-
// +build !appengine
11-
// +build !android
129

1310
package main
1411

src/cmd/trace/annotations_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !js
6-
// +build !js
76

87
package main
98

src/cmd/trace/trace_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !js
6-
// +build !js
76

87
package main
98

src/cmd/trace/trace_unix_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6-
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
76

87
package main
98

src/crypto/aes/aes_gcm.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build amd64 || arm64
6-
// +build amd64 arm64
76

87
package aes
98

src/crypto/aes/cipher_asm.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build amd64 || arm64
6-
// +build amd64 arm64
76

87
package aes
98

src/crypto/aes/cipher_generic.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !amd64 && !s390x && !ppc64le && !arm64
6-
// +build !amd64,!s390x,!ppc64le,!arm64
76

87
package aes
98

src/crypto/aes/gcm_ppc64le.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ppc64le
6-
// +build ppc64le
76

87
package aes
98

src/crypto/cipher/xor_generic.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !amd64 && !ppc64 && !ppc64le && !arm64
6-
// +build !amd64,!ppc64,!ppc64le,!arm64
76

87
package cipher
98

src/crypto/cipher/xor_ppc64x.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ppc64 || ppc64le
6-
// +build ppc64 ppc64le
76

87
package cipher
98

src/crypto/ecdsa/ecdsa_noasm.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !s390x
6-
// +build !s390x
76

87
package ecdsa
98

src/crypto/ecdsa/ecdsa_s390x_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build s390x
6-
// +build s390x
76

87
package ecdsa
98

0 commit comments

Comments
 (0)