all: go fmt ./...

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Not strictly necessary but will avoid gofmt changes later
as people edit these files.

Change-Id: I20749ed82e18938a305d9425d0739f0ea7bd24c0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/294414
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/cmd/callgraph/main_test.go b/cmd/callgraph/main_test.go
index 6aeae6f..f486def 100644
--- a/cmd/callgraph/main_test.go
+++ b/cmd/callgraph/main_test.go
@@ -4,8 +4,8 @@
 
 // No testdata on Android.
 
-// +build !android
-// +build go1.11
+//go:build !android && go1.11
+// +build !android,go1.11
 
 package main
 
diff --git a/cmd/cover/cover_test.go b/cmd/cover/cover_test.go
index 54d3465..228c911 100644
--- a/cmd/cover/cover_test.go
+++ b/cmd/cover/cover_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package main_test
diff --git a/cmd/fiximports/main_test.go b/cmd/fiximports/main_test.go
index 2e011d3..9d2c94c 100644
--- a/cmd/fiximports/main_test.go
+++ b/cmd/fiximports/main_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package main
diff --git a/cmd/getgo/download.go b/cmd/getgo/download.go
index 383cb3d..1731131 100644
--- a/cmd/getgo/download.go
+++ b/cmd/getgo/download.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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/download_test.go b/cmd/getgo/download_test.go
index 5a5cc29..76cd96c 100644
--- a/cmd/getgo/download_test.go
+++ b/cmd/getgo/download_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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/main.go b/cmd/getgo/main.go
index 417e860..441fd89 100644
--- a/cmd/getgo/main.go
+++ b/cmd/getgo/main.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 !plan9
 // +build !plan9
 
 // The getgo command installs Go to the user's system.
diff --git a/cmd/getgo/main_test.go b/cmd/getgo/main_test.go
index e430895..0c0e8b9 100644
--- a/cmd/getgo/main_test.go
+++ b/cmd/getgo/main_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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/path.go b/cmd/getgo/path.go
index 52e0462..f1799a8 100644
--- a/cmd/getgo/path.go
+++ b/cmd/getgo/path.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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/path_test.go b/cmd/getgo/path_test.go
index 5355c6e..2249c54 100644
--- a/cmd/getgo/path_test.go
+++ b/cmd/getgo/path_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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/steps.go b/cmd/getgo/steps.go
index e505f5a..fe69aa6 100644
--- a/cmd/getgo/steps.go
+++ b/cmd/getgo/steps.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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/system.go b/cmd/getgo/system.go
index 232ca36..3449c9c 100644
--- a/cmd/getgo/system.go
+++ b/cmd/getgo/system.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 !plan9
 // +build !plan9
 
 package main
diff --git a/cmd/getgo/system_unix.go b/cmd/getgo/system_unix.go
index adc3e55..09606f8 100644
--- a/cmd/getgo/system_unix.go
+++ b/cmd/getgo/system_unix.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 || nacl || netbsd || openbsd || solaris
 // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
 
 package main
diff --git a/cmd/getgo/system_windows.go b/cmd/getgo/system_windows.go
index d8a6191..5b1e247 100644
--- a/cmd/getgo/system_windows.go
+++ b/cmd/getgo/system_windows.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
 // +build windows
 
 package main
diff --git a/cmd/godex/isAlias18.go b/cmd/godex/isAlias18.go
index cab1292..431602b 100644
--- a/cmd/godex/isAlias18.go
+++ b/cmd/godex/isAlias18.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 main
diff --git a/cmd/godex/isAlias19.go b/cmd/godex/isAlias19.go
index 6ebdd42..e588911 100644
--- a/cmd/godex/isAlias19.go
+++ b/cmd/godex/isAlias19.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 main
diff --git a/cmd/goimports/goimports_gc.go b/cmd/goimports/goimports_gc.go
index 21d867e..190a565 100644
--- a/cmd/goimports/goimports_gc.go
+++ b/cmd/goimports/goimports_gc.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
 // +build gc
 
 package main
diff --git a/cmd/goimports/goimports_not_gc.go b/cmd/goimports/goimports_not_gc.go
index f5531ce..344fe75 100644
--- a/cmd/goimports/goimports_not_gc.go
+++ b/cmd/goimports/goimports_not_gc.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
 // +build !gc
 
 package main
diff --git a/cmd/gotype/sizesFor18.go b/cmd/gotype/sizesFor18.go
index 94e8176..39e3d9f 100644
--- a/cmd/gotype/sizesFor18.go
+++ b/cmd/gotype/sizesFor18.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
 
 // This file contains a copy of the implementation of types.SizesFor
diff --git a/cmd/gotype/sizesFor19.go b/cmd/gotype/sizesFor19.go
index 9e0b481..34181c8 100644
--- a/cmd/gotype/sizesFor19.go
+++ b/cmd/gotype/sizesFor19.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 main
diff --git a/cmd/guru/isAlias18.go b/cmd/guru/isAlias18.go
index 6a2a4c0..6d91017 100644
--- a/cmd/guru/isAlias18.go
+++ b/cmd/guru/isAlias18.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 main
diff --git a/cmd/guru/isAlias19.go b/cmd/guru/isAlias19.go
index 25096ab..4d63679 100644
--- a/cmd/guru/isAlias19.go
+++ b/cmd/guru/isAlias19.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 main
diff --git a/cmd/splitdwarf/splitdwarf.go b/cmd/splitdwarf/splitdwarf.go
index 44e7a7a..a13b9f3 100644
--- a/cmd/splitdwarf/splitdwarf.go
+++ b/cmd/splitdwarf/splitdwarf.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 !js && !nacl && !plan9 && !solaris && !windows
 // +build !js,!nacl,!plan9,!solaris,!windows
 
 /*
diff --git a/cmd/stress/stress.go b/cmd/stress/stress.go
index 4ff6cf3..9ba6ef3 100644
--- a/cmd/stress/stress.go
+++ b/cmd/stress/stress.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 !plan9
 // +build !plan9
 
 // The stress utility is intended for catching sporadic failures.
diff --git a/cmd/stringer/endtoend_test.go b/cmd/stringer/endtoend_test.go
index af106b5..3b0b39d 100644
--- a/cmd/stringer/endtoend_test.go
+++ b/cmd/stringer/endtoend_test.go
@@ -4,6 +4,7 @@
 
 // go command is not available on android
 
+//go:build !android
 // +build !android
 
 package main
diff --git a/container/intsets/popcnt_amd64.go b/container/intsets/popcnt_amd64.go
index 99ea813..25c02f4 100644
--- a/container/intsets/popcnt_amd64.go
+++ b/container/intsets/popcnt_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 && !appengine && !gccgo
 // +build amd64,!appengine,!gccgo
 
 package intsets
diff --git a/container/intsets/popcnt_gccgo.go b/container/intsets/popcnt_gccgo.go
index 3fc5e85..5e1efcf 100644
--- a/container/intsets/popcnt_gccgo.go
+++ b/container/intsets/popcnt_gccgo.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 gccgo
 // +build gccgo
 
 package intsets
diff --git a/container/intsets/popcnt_generic.go b/container/intsets/popcnt_generic.go
index 3985a1d..caffedc 100644
--- a/container/intsets/popcnt_generic.go
+++ b/container/intsets/popcnt_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 (!amd64 || appengine) && !gccgo
 // +build !amd64 appengine
 // +build !gccgo
 
diff --git a/go/analysis/multichecker/multichecker_test.go b/go/analysis/multichecker/multichecker_test.go
index c7a2c46..07bf977 100644
--- a/go/analysis/multichecker/multichecker_test.go
+++ b/go/analysis/multichecker/multichecker_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.12
 // +build go1.12
 
 package multichecker_test
diff --git a/go/analysis/passes/errorsas/errorsas_test.go b/go/analysis/passes/errorsas/errorsas_test.go
index 19e783e..5ef8668 100644
--- a/go/analysis/passes/errorsas/errorsas_test.go
+++ b/go/analysis/passes/errorsas/errorsas_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 errorsas_test
diff --git a/go/analysis/unitchecker/main.go b/go/analysis/unitchecker/main.go
index 7fa7c85..23acb7e 100644
--- a/go/analysis/unitchecker/main.go
+++ b/go/analysis/unitchecker/main.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 ignore
 // +build ignore
 
 // This file provides an example command for static checkers
diff --git a/go/analysis/unitchecker/unitchecker112.go b/go/analysis/unitchecker/unitchecker112.go
index 9051456..3180f4a 100644
--- a/go/analysis/unitchecker/unitchecker112.go
+++ b/go/analysis/unitchecker/unitchecker112.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 unitchecker
diff --git a/go/analysis/unitchecker/unitchecker_test.go b/go/analysis/unitchecker/unitchecker_test.go
index 4a302ff..7e5b848 100644
--- a/go/analysis/unitchecker/unitchecker_test.go
+++ b/go/analysis/unitchecker/unitchecker_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.12
 // +build go1.12
 
 package unitchecker_test
diff --git a/go/buildutil/allpackages_test.go b/go/buildutil/allpackages_test.go
index ccdc31b..1aa194d 100644
--- a/go/buildutil/allpackages_test.go
+++ b/go/buildutil/allpackages_test.go
@@ -4,6 +4,7 @@
 
 // Incomplete source tree on Android.
 
+//go:build !android
 // +build !android
 
 package buildutil_test
diff --git a/go/callgraph/cha/cha_test.go b/go/callgraph/cha/cha_test.go
index cb2d585..3dc0314 100644
--- a/go/callgraph/cha/cha_test.go
+++ b/go/callgraph/cha/cha_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package cha_test
diff --git a/go/callgraph/rta/rta_test.go b/go/callgraph/rta/rta_test.go
index 28a00b3..9ae1bdf 100644
--- a/go/callgraph/rta/rta_test.go
+++ b/go/callgraph/rta/rta_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package rta_test
diff --git a/go/gcexportdata/example_test.go b/go/gcexportdata/example_test.go
index a50bc40..fda3f60 100644
--- a/go/gcexportdata/example_test.go
+++ b/go/gcexportdata/example_test.go
@@ -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 go1.7
-// +build gc
+//go:build go1.7 && gc
+// +build go1.7,gc
 
 package gcexportdata_test
 
diff --git a/go/gcexportdata/main.go b/go/gcexportdata/main.go
index 2713dce..e9df4e9 100644
--- a/go/gcexportdata/main.go
+++ b/go/gcexportdata/main.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 ignore
 // +build ignore
 
 // The gcexportdata command is a diagnostic tool that displays the
diff --git a/go/internal/gccgoimporter/newInterface10.go b/go/internal/gccgoimporter/newInterface10.go
index 9a108d4..1b449ef 100644
--- a/go/internal/gccgoimporter/newInterface10.go
+++ b/go/internal/gccgoimporter/newInterface10.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
 // +build !go1.11
 
 package gccgoimporter
diff --git a/go/internal/gccgoimporter/newInterface11.go b/go/internal/gccgoimporter/newInterface11.go
index 1636610..631546e 100644
--- a/go/internal/gccgoimporter/newInterface11.go
+++ b/go/internal/gccgoimporter/newInterface11.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
 // +build go1.11
 
 package gccgoimporter
diff --git a/go/internal/gcimporter/iexport_test.go b/go/internal/gcimporter/iexport_test.go
index b6b4001..5385011 100644
--- a/go/internal/gcimporter/iexport_test.go
+++ b/go/internal/gcimporter/iexport_test.go
@@ -4,6 +4,7 @@
 
 // This is a copy of bexport_test.go for iexport.go.
 
+//go:build go1.11
 // +build go1.11
 
 package gcimporter_test
diff --git a/go/internal/gcimporter/israce_test.go b/go/internal/gcimporter/israce_test.go
index af8e52b..885ba1c 100644
--- a/go/internal/gcimporter/israce_test.go
+++ b/go/internal/gcimporter/israce_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 race
 // +build race
 
 package gcimporter_test
diff --git a/go/internal/gcimporter/newInterface10.go b/go/internal/gcimporter/newInterface10.go
index 463f252..8b163e3 100644
--- a/go/internal/gcimporter/newInterface10.go
+++ b/go/internal/gcimporter/newInterface10.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
 // +build !go1.11
 
 package gcimporter
diff --git a/go/internal/gcimporter/newInterface11.go b/go/internal/gcimporter/newInterface11.go
index ab28b95..49984f4 100644
--- a/go/internal/gcimporter/newInterface11.go
+++ b/go/internal/gcimporter/newInterface11.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
 // +build go1.11
 
 package gcimporter
diff --git a/go/loader/loader_test.go b/go/loader/loader_test.go
index e68405a..e39653c 100644
--- a/go/loader/loader_test.go
+++ b/go/loader/loader_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package loader_test
diff --git a/go/packages/packagestest/modules_111.go b/go/packages/packagestest/modules_111.go
index 61fa969..4b976f6 100644
--- a/go/packages/packagestest/modules_111.go
+++ b/go/packages/packagestest/modules_111.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
 // +build go1.11
 
 package packagestest
diff --git a/go/pointer/pointer_test.go b/go/pointer/pointer_test.go
index 07a241b..2f6e069 100644
--- a/go/pointer/pointer_test.go
+++ b/go/pointer/pointer_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package pointer_test
diff --git a/go/pointer/stdlib_test.go b/go/pointer/stdlib_test.go
index d3ba721..2d5097f 100644
--- a/go/pointer/stdlib_test.go
+++ b/go/pointer/stdlib_test.go
@@ -4,6 +4,7 @@
 
 // Incomplete source tree on Android.
 
+//go:build !android
 // +build !android
 
 package pointer
diff --git a/go/ssa/identical.go b/go/ssa/identical.go
index f3cc8ac..e802696 100644
--- a/go/ssa/identical.go
+++ b/go/ssa/identical.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.8
 // +build go1.8
 
 package ssa
diff --git a/go/ssa/identical_17.go b/go/ssa/identical_17.go
index faa124f..575aa5d 100644
--- a/go/ssa/identical_17.go
+++ b/go/ssa/identical_17.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.8
 // +build !go1.8
 
 package ssa
diff --git a/go/ssa/identical_test.go b/go/ssa/identical_test.go
index 2fd4ae9..25484a5 100644
--- a/go/ssa/identical_test.go
+++ b/go/ssa/identical_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.8
 // +build go1.8
 
 package ssa_test
diff --git a/go/ssa/ssautil/switch_test.go b/go/ssa/ssautil/switch_test.go
index a47dbef..bad8bdd 100644
--- a/go/ssa/ssautil/switch_test.go
+++ b/go/ssa/ssautil/switch_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package ssautil_test
diff --git a/go/ssa/stdlib_test.go b/go/ssa/stdlib_test.go
index 41b87ff..1c358b0 100644
--- a/go/ssa/stdlib_test.go
+++ b/go/ssa/stdlib_test.go
@@ -4,6 +4,7 @@
 
 // Incomplete source tree on Android.
 
+//go:build !android
 // +build !android
 
 package ssa_test
diff --git a/godoc/godoc17_test.go b/godoc/godoc17_test.go
index d153991..82e23e6 100644
--- a/godoc/godoc17_test.go
+++ b/godoc/godoc17_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 godoc
diff --git a/godoc/static/makestatic.go b/godoc/static/makestatic.go
index 0f910f0..ef7b904 100644
--- a/godoc/static/makestatic.go
+++ b/godoc/static/makestatic.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 ignore
 // +build ignore
 
 // Command makestatic writes the generated file buffer to "static.go".
diff --git a/godoc/vfs/fs.go b/godoc/vfs/fs.go
index b033666..f12d653 100644
--- a/godoc/vfs/fs.go
+++ b/godoc/vfs/fs.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.16
 // +build go1.16
 
 package vfs
diff --git a/gopls/internal/hooks/analysis.go b/gopls/internal/hooks/analysis.go
index 6bab2be..23d4ab6 100644
--- a/gopls/internal/hooks/analysis.go
+++ b/gopls/internal/hooks/analysis.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 hooks
diff --git a/gopls/internal/hooks/analysis_115.go b/gopls/internal/hooks/analysis_115.go
index ffb01a4..187e522 100644
--- a/gopls/internal/hooks/analysis_115.go
+++ b/gopls/internal/hooks/analysis_115.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 hooks
diff --git a/gopls/internal/regtest/misc/generate_test.go b/gopls/internal/regtest/misc/generate_test.go
index 6987924..a7631d9 100644
--- a/gopls/internal/regtest/misc/generate_test.go
+++ b/gopls/internal/regtest/misc/generate_test.go
@@ -4,6 +4,7 @@
 
 // TODO(rfindley): figure out why go generate fails on android builders.
 
+//go:build !android
 // +build !android
 
 package misc
diff --git a/internal/fastwalk/fastwalk_dirent_fileno.go b/internal/fastwalk/fastwalk_dirent_fileno.go
index ccffec5..d58595d 100644
--- a/internal/fastwalk/fastwalk_dirent_fileno.go
+++ b/internal/fastwalk/fastwalk_dirent_fileno.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 freebsd || openbsd || netbsd
 // +build freebsd openbsd netbsd
 
 package fastwalk
diff --git a/internal/fastwalk/fastwalk_dirent_ino.go b/internal/fastwalk/fastwalk_dirent_ino.go
index ab7fbc0..ea02b9e 100644
--- a/internal/fastwalk/fastwalk_dirent_ino.go
+++ b/internal/fastwalk/fastwalk_dirent_ino.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 (linux || darwin) && !appengine
 // +build linux darwin
 // +build !appengine
 
diff --git a/internal/fastwalk/fastwalk_dirent_namlen_bsd.go b/internal/fastwalk/fastwalk_dirent_namlen_bsd.go
index a3b26a7..d5c9c32 100644
--- a/internal/fastwalk/fastwalk_dirent_namlen_bsd.go
+++ b/internal/fastwalk/fastwalk_dirent_namlen_bsd.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 darwin || freebsd || openbsd || netbsd
 // +build darwin freebsd openbsd netbsd
 
 package fastwalk
diff --git a/internal/fastwalk/fastwalk_dirent_namlen_linux.go b/internal/fastwalk/fastwalk_dirent_namlen_linux.go
index e880d35..c82e57d 100644
--- a/internal/fastwalk/fastwalk_dirent_namlen_linux.go
+++ b/internal/fastwalk/fastwalk_dirent_namlen_linux.go
@@ -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 linux
-// +build !appengine
+//go:build linux && !appengine
+// +build linux,!appengine
 
 package fastwalk
 
diff --git a/internal/fastwalk/fastwalk_portable.go b/internal/fastwalk/fastwalk_portable.go
index b0d6327..085d311 100644
--- a/internal/fastwalk/fastwalk_portable.go
+++ b/internal/fastwalk/fastwalk_portable.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 appengine || (!linux && !darwin && !freebsd && !openbsd && !netbsd)
 // +build appengine !linux,!darwin,!freebsd,!openbsd,!netbsd
 
 package fastwalk
diff --git a/internal/fastwalk/fastwalk_unix.go b/internal/fastwalk/fastwalk_unix.go
index 5901a8f..e4edb5c 100644
--- a/internal/fastwalk/fastwalk_unix.go
+++ b/internal/fastwalk/fastwalk_unix.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 (linux || darwin || freebsd || openbsd || netbsd) && !appengine
 // +build linux darwin freebsd openbsd netbsd
 // +build !appengine
 
diff --git a/internal/imports/mkindex.go b/internal/imports/mkindex.go
index ef8c0d2..36a532b 100644
--- a/internal/imports/mkindex.go
+++ b/internal/imports/mkindex.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // Copyright 2013 The Go Authors. All rights reserved.
diff --git a/internal/imports/mkstdlib.go b/internal/imports/mkstdlib.go
index 53c16e9..f5ea292 100644
--- a/internal/imports/mkstdlib.go
+++ b/internal/imports/mkstdlib.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 ignore
 // +build ignore
 
 // mkstdlib generates the zstdlib.go file, containing the Go standard
diff --git a/internal/lsp/lsprpc/autostart_posix.go b/internal/lsp/lsprpc/autostart_posix.go
index 9ad3f1d..45089b8 100644
--- a/internal/lsp/lsprpc/autostart_posix.go
+++ b/internal/lsp/lsprpc/autostart_posix.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 darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package lsprpc
diff --git a/internal/span/token111.go b/internal/span/token111.go
index bf7a540..c41e94b 100644
--- a/internal/span/token111.go
+++ b/internal/span/token111.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 span
diff --git a/internal/span/token112.go b/internal/span/token112.go
index 017aec9..4c4dea1 100644
--- a/internal/span/token112.go
+++ b/internal/span/token112.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 span
diff --git a/internal/span/uri_test.go b/internal/span/uri_test.go
index 260f948..bcbad87 100644
--- a/internal/span/uri_test.go
+++ b/internal/span/uri_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
 // +build !windows
 
 package span_test
diff --git a/internal/span/uri_windows_test.go b/internal/span/uri_windows_test.go
index 2a2632e..e50b58f 100644
--- a/internal/span/uri_windows_test.go
+++ b/internal/span/uri_windows_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
 // +build windows
 
 package span_test
diff --git a/internal/testenv/testenv_112.go b/internal/testenv/testenv_112.go
index b25846c..4b6e57d 100644
--- a/internal/testenv/testenv_112.go
+++ b/internal/testenv/testenv_112.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 testenv
diff --git a/playground/socket/socket.go b/playground/socket/socket.go
index 5e385eb..cdc6653 100644
--- a/playground/socket/socket.go
+++ b/playground/socket/socket.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 !appengine
 // +build !appengine
 
 // Package socket implements an WebSocket-based playground backend.
diff --git a/refactor/eg/eg_test.go b/refactor/eg/eg_test.go
index 158f909..a788361 100644
--- a/refactor/eg/eg_test.go
+++ b/refactor/eg/eg_test.go
@@ -4,6 +4,7 @@
 
 // No testdata on Android.
 
+//go:build !android
 // +build !android
 
 package eg_test
diff --git a/refactor/importgraph/graph_test.go b/refactor/importgraph/graph_test.go
index e342323..2ab54e2 100644
--- a/refactor/importgraph/graph_test.go
+++ b/refactor/importgraph/graph_test.go
@@ -4,6 +4,7 @@
 
 // Incomplete std lib sources on Android.
 
+//go:build !android
 // +build !android
 
 package importgraph_test