Skip to content

Commit

Permalink
all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rsc committed Oct 28, 2021
1 parent ed475fe commit f229e70
Show file tree
Hide file tree
Showing 834 changed files with 9 additions and 941 deletions.
1 change: 0 additions & 1 deletion src/archive/tar/stat_actime1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build aix || linux || dragonfly || openbsd || solaris
// +build aix linux dragonfly openbsd solaris

package tar

Expand Down
1 change: 0 additions & 1 deletion src/archive/tar/stat_actime2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || freebsd || netbsd
// +build darwin freebsd netbsd

package tar

Expand Down
1 change: 0 additions & 1 deletion src/archive/tar/stat_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris
// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris

package tar

Expand Down
1 change: 0 additions & 1 deletion src/bytes/boundary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//
//go:build linux
// +build linux

package bytes_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/api/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

// The run program is invoked via the dist tool.
// To invoke manually: go tool dist test -run api --no-rebuild
Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/go11.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build go1.1
// +build go1.1

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/go_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package main_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/base/signal_notunix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build plan9 || windows
// +build plan9 windows

package base

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/base/signal_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd js linux netbsd openbsd solaris

package base

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build aix || (solaris && !illumos)
// +build aix solaris,!illumos

// This code implements the filelock API using POSIX 'fcntl' locks, which attach
// to an (inode, process) pair rather than a file descriptor. To avoid unlocking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package filelock

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package filelock

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package filelock_test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd
// +build darwin dragonfly freebsd illumos linux netbsd openbsd

package filelock

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build windows
// +build windows

package filelock

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/lockedfile/lockedfile_filelock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package lockedfile

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/lockedfile/lockedfile_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package lockedfile

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/lockedfile/lockedfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

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

package lockedfile_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/lockedfile/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

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

package lockedfile_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modfetch/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build cmd_go_bootstrap
// +build cmd_go_bootstrap

package modfetch

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modfetch/codehost/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

// Interactive debugging shell for codehost.Repo implementations.

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modfetch/sumdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Go checksum database lookup

//go:build !cmd_go_bootstrap
// +build !cmd_go_bootstrap

package modfetch

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modload/stat_openfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build (js && wasm) || plan9
// +build js,wasm plan9

// On plan9, per http://9p.io/magic/man2html/2/access: “Since file permissions
// are checked by the server and group information is not known to the client,
Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modload/stat_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 modload

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/modload/stat_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build windows
// +build windows

package modload

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/robustio/robustio_flaky.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build windows || darwin
// +build windows darwin

package robustio

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/robustio/robustio_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package robustio

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/test/genflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/web/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build cmd_go_bootstrap
// +build cmd_go_bootstrap

// This code is compiled only into the bootstrap 'go' binary.
// These stubs avoid importing packages with large dependency
Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/web/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !cmd_go_bootstrap
// +build !cmd_go_bootstrap

// This code is compiled into the real 'go' binary, but it is not
// compiled into the binary that is built during all.bash, so as
Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/web/url_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package web

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/web/url_other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package web

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/internal/work/testgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// This file contains extra hooks for testing the go command.

//go:build testgo
// +build testgo

package work

Expand Down
9 changes: 0 additions & 9 deletions src/cmd/go/stop_other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !(aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris)
// +build !aix
// +build !darwin
// +build !dragonfly
// +build !freebsd
// +build !js !wasm
// +build !linux
// +build !netbsd
// +build !openbsd
// +build !solaris

package main_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/stop_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package main_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/nm/nm_cgo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build cgo
// +build cgo

package main

Expand Down
3 changes: 0 additions & 3 deletions src/cmd/pprof/readlineui.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// that provides the readline functionality if possible.

//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows) && !appengine && !android
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
// +build !appengine
// +build !android

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/trace/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/trace/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/trace/trace_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package main

Expand Down
1 change: 0 additions & 1 deletion src/crypto/aes/aes_gcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build amd64 || arm64
// +build amd64 arm64

package aes

Expand Down
1 change: 0 additions & 1 deletion src/crypto/aes/cipher_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build amd64 || arm64
// +build amd64 arm64

package aes

Expand Down
1 change: 0 additions & 1 deletion src/crypto/aes/cipher_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion src/crypto/aes/gcm_ppc64le.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ppc64le
// +build ppc64le

package aes

Expand Down
1 change: 0 additions & 1 deletion src/crypto/cipher/xor_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion src/crypto/cipher/xor_ppc64x.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ppc64 || ppc64le
// +build ppc64 ppc64le

package cipher

Expand Down
1 change: 0 additions & 1 deletion src/crypto/ecdsa/ecdsa_noasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !s390x
// +build !s390x

package ecdsa

Expand Down
1 change: 0 additions & 1 deletion src/crypto/ecdsa/ecdsa_s390x_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build s390x
// +build s390x

package ecdsa

Expand Down
Loading

0 comments on commit f229e70

Please sign in to comment.