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: I8f1f65728dad29d63bc5a1ea5fdb4cbac255c7e5
Reviewed-on: https://go-review.googlesource.com/c/text/+/294372
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>
diff --git a/cases/gen.go b/cases/gen.go
index e7bccc8..a041fed 100644
--- a/cases/gen.go
+++ b/cases/gen.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 program generates the trie for casing operations. The Unicode casing
diff --git a/cases/gen_trieval.go b/cases/gen_trieval.go
index 26fadd6..6c7222a 100644
--- a/cases/gen_trieval.go
+++ b/cases/gen_trieval.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
 
 package main
diff --git a/cases/icu.go b/cases/icu.go
index 46530d1..2dc84b3 100644
--- a/cases/icu.go
+++ b/cases/icu.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 icu
 // +build icu
 
 package cases
diff --git a/cases/icu_test.go b/cases/icu_test.go
index e2b0ada..f3ed838 100644
--- a/cases/icu_test.go
+++ b/cases/icu_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 icu
 // +build icu
 
 package cases
diff --git a/cases/tables10.0.0.go b/cases/tables10.0.0.go
index 5c87950..ca99231 100644
--- a/cases/tables10.0.0.go
+++ b/cases/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package cases
diff --git a/cases/tables10.0.0_test.go b/cases/tables10.0.0_test.go
index 186065c..779eaf5 100644
--- a/cases/tables10.0.0_test.go
+++ b/cases/tables10.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package cases
diff --git a/cases/tables11.0.0.go b/cases/tables11.0.0.go
index 84d2701..b1106b4 100644
--- a/cases/tables11.0.0.go
+++ b/cases/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package cases
diff --git a/cases/tables11.0.0_test.go b/cases/tables11.0.0_test.go
index 2f441af..bc8fc54 100644
--- a/cases/tables11.0.0_test.go
+++ b/cases/tables11.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package cases
diff --git a/cases/tables12.0.0.go b/cases/tables12.0.0.go
index edee17d..ae7dc24 100644
--- a/cases/tables12.0.0.go
+++ b/cases/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package cases
diff --git a/cases/tables12.0.0_test.go b/cases/tables12.0.0_test.go
index b017b43..04f3b6b 100644
--- a/cases/tables12.0.0_test.go
+++ b/cases/tables12.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package cases
diff --git a/cases/tables13.0.0.go b/cases/tables13.0.0.go
index 90a2453..cd87477 100644
--- a/cases/tables13.0.0.go
+++ b/cases/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package cases
diff --git a/cases/tables13.0.0_test.go b/cases/tables13.0.0_test.go
index 82f3e19..57c78a8 100644
--- a/cases/tables13.0.0_test.go
+++ b/cases/tables13.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package cases
diff --git a/cases/tables9.0.0.go b/cases/tables9.0.0.go
index 4949fa7..636d5d1 100644
--- a/cases/tables9.0.0.go
+++ b/cases/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package cases
diff --git a/cases/tables9.0.0_test.go b/cases/tables9.0.0_test.go
index 398d253..ac804f4 100644
--- a/cases/tables9.0.0_test.go
+++ b/cases/tables9.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package cases
diff --git a/cmd/gotext/examples/rewrite/printer.go b/cmd/gotext/examples/rewrite/printer.go
index 9ed0556..309d195 100644
--- a/cmd/gotext/examples/rewrite/printer.go
+++ b/cmd/gotext/examples/rewrite/printer.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
 
 package main
diff --git a/collate/maketables.go b/collate/maketables.go
index 3b25d7b..59afeb9 100644
--- a/collate/maketables.go
+++ b/collate/maketables.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
 
 // Collation table generator.
diff --git a/collate/tools/colcmp/darwin.go b/collate/tools/colcmp/darwin.go
index d2300e3..1be3267 100644
--- a/collate/tools/colcmp/darwin.go
+++ b/collate/tools/colcmp/darwin.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
 // +build darwin
 
 package main
diff --git a/collate/tools/colcmp/icu.go b/collate/tools/colcmp/icu.go
index 76de404..b816acf 100644
--- a/collate/tools/colcmp/icu.go
+++ b/collate/tools/colcmp/icu.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 icu
 // +build icu
 
 package main
diff --git a/currency/gen.go b/currency/gen.go
index da7712f..4a2c855 100644
--- a/currency/gen.go
+++ b/currency/gen.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
 
 // Generator for currency-related data.
diff --git a/currency/gen_common.go b/currency/gen_common.go
index e1cea24..e483bed 100644
--- a/currency/gen_common.go
+++ b/currency/gen_common.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
 
 package main
diff --git a/date/gen.go b/date/gen.go
index 1fff919..b58b9f7 100644
--- a/date/gen.go
+++ b/date/gen.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
 
 package main
diff --git a/encoding/charmap/maketables.go b/encoding/charmap/maketables.go
index f794170..70bf360 100644
--- a/encoding/charmap/maketables.go
+++ b/encoding/charmap/maketables.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
 
 package main
diff --git a/encoding/htmlindex/gen.go b/encoding/htmlindex/gen.go
index ac6b4a7..d47f8db 100644
--- a/encoding/htmlindex/gen.go
+++ b/encoding/htmlindex/gen.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
 
 package main
diff --git a/encoding/ianaindex/ascii.go b/encoding/ianaindex/ascii.go
index 9792f81..2b9824f 100644
--- a/encoding/ianaindex/ascii.go
+++ b/encoding/ianaindex/ascii.go
@@ -10,8 +10,8 @@
 
 	"golang.org/x/text/encoding"
 	"golang.org/x/text/encoding/internal"
-	"golang.org/x/text/transform"
 	"golang.org/x/text/encoding/internal/identifier"
+	"golang.org/x/text/transform"
 )
 
 type asciiDecoder struct {
@@ -22,7 +22,7 @@
 	for _, c := range src {
 		if c > unicode.MaxASCII {
 			r := unicode.ReplacementChar
-			if nDst + utf8.RuneLen(r) > len(dst) {
+			if nDst+utf8.RuneLen(r) > len(dst) {
 				err = transform.ErrShortDst
 				break
 			}
diff --git a/encoding/ianaindex/ascii_test.go b/encoding/ianaindex/ascii_test.go
index a184ab9..873ec7e 100644
--- a/encoding/ianaindex/ascii_test.go
+++ b/encoding/ianaindex/ascii_test.go
@@ -5,8 +5,8 @@
 package ianaindex
 
 import (
-	"unicode"
 	"testing"
+	"unicode"
 
 	"golang.org/x/text/encoding"
 )
diff --git a/encoding/ianaindex/gen.go b/encoding/ianaindex/gen.go
index 1b61b82..61d2366 100644
--- a/encoding/ianaindex/gen.go
+++ b/encoding/ianaindex/gen.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
 
 package main
diff --git a/encoding/internal/identifier/gen.go b/encoding/internal/identifier/gen.go
index 26cfef9..039cb27 100644
--- a/encoding/internal/identifier/gen.go
+++ b/encoding/internal/identifier/gen.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
 
 package main
diff --git a/encoding/japanese/maketables.go b/encoding/japanese/maketables.go
index 023957a..3066a39 100644
--- a/encoding/japanese/maketables.go
+++ b/encoding/japanese/maketables.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
 
 package main
diff --git a/encoding/korean/maketables.go b/encoding/korean/maketables.go
index c84034f..9552286 100644
--- a/encoding/korean/maketables.go
+++ b/encoding/korean/maketables.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
 
 package main
diff --git a/encoding/simplifiedchinese/maketables.go b/encoding/simplifiedchinese/maketables.go
index 55016c7..44988bf 100644
--- a/encoding/simplifiedchinese/maketables.go
+++ b/encoding/simplifiedchinese/maketables.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
 
 package main
diff --git a/encoding/traditionalchinese/maketables.go b/encoding/traditionalchinese/maketables.go
index cf7fdb3..33f7905 100644
--- a/encoding/traditionalchinese/maketables.go
+++ b/encoding/traditionalchinese/maketables.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
 
 package main
diff --git a/feature/plural/gen.go b/feature/plural/gen.go
index 42f2f86..b9c5f24 100644
--- a/feature/plural/gen.go
+++ b/feature/plural/gen.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
 
 package main
diff --git a/feature/plural/gen_common.go b/feature/plural/gen_common.go
index 24aa415..bd92a4d 100644
--- a/feature/plural/gen_common.go
+++ b/feature/plural/gen_common.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
 
 package main
diff --git a/gen.go b/gen.go
index 177bc0b..04ff603 100644
--- a/gen.go
+++ b/gen.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
 
 // gen runs go generate on Unicode- and CLDR-related package in the text
diff --git a/internal/export/idna/gen.go b/internal/export/idna/gen.go
index 4ad9804..1109c18 100644
--- a/internal/export/idna/gen.go
+++ b/internal/export/idna/gen.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 program generates the trie for idna operations. The Unicode casing
diff --git a/internal/export/idna/gen10.0.0_test.go b/internal/export/idna/gen10.0.0_test.go
index c5dfdde..0ac9497 100644
--- a/internal/export/idna/gen10.0.0_test.go
+++ b/internal/export/idna/gen10.0.0_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.10
 // +build go1.10
 
 package idna
diff --git a/internal/export/idna/gen9.0.0_test.go b/internal/export/idna/gen9.0.0_test.go
index 0e66f0b..47b9ef9 100644
--- a/internal/export/idna/gen9.0.0_test.go
+++ b/internal/export/idna/gen9.0.0_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.10
 // +build !go1.10
 
 package idna
diff --git a/internal/export/idna/gen_common.go b/internal/export/idna/gen_common.go
index 360a02b..8d87ba2 100644
--- a/internal/export/idna/gen_common.go
+++ b/internal/export/idna/gen_common.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
 
 package main
diff --git a/internal/export/idna/gen_trieval.go b/internal/export/idna/gen_trieval.go
index 0de99b0..9d92407 100644
--- a/internal/export/idna/gen_trieval.go
+++ b/internal/export/idna/gen_trieval.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
 
 package main
diff --git a/internal/export/idna/idna10.0.0.go b/internal/export/idna/idna10.0.0.go
index 2ceb327..3e7bac3 100644
--- a/internal/export/idna/idna10.0.0.go
+++ b/internal/export/idna/idna10.0.0.go
@@ -2,7 +2,9 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build go1.10
 // +build go1.10
+
 //go:generate go run gen.go gen_trieval.go gen_common.go
 
 // Package idna implements IDNA2008 using the compatibility processing
diff --git a/internal/export/idna/idna10.0.0_test.go b/internal/export/idna/idna10.0.0_test.go
index 66ea636..4142bfa 100644
--- a/internal/export/idna/idna10.0.0_test.go
+++ b/internal/export/idna/idna10.0.0_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.10
 // +build go1.10
 
 package idna
diff --git a/internal/export/idna/idna9.0.0.go b/internal/export/idna/idna9.0.0.go
index 1ea9431..7acecb8 100644
--- a/internal/export/idna/idna9.0.0.go
+++ b/internal/export/idna/idna9.0.0.go
@@ -2,7 +2,9 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !go1.10
 // +build !go1.10
+
 //go:generate go run gen.go gen_trieval.go gen_common.go
 
 // Package idna implements IDNA2008 using the compatibility processing
diff --git a/internal/export/idna/idna9.0.0_test.go b/internal/export/idna/idna9.0.0_test.go
index 03b1267..b76b796 100644
--- a/internal/export/idna/idna9.0.0_test.go
+++ b/internal/export/idna/idna9.0.0_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.10
 // +build !go1.10
 
 package idna
diff --git a/internal/export/idna/tables10.0.0.go b/internal/export/idna/tables10.0.0.go
index 54fddb4..d1d62ef 100644
--- a/internal/export/idna/tables10.0.0.go
+++ b/internal/export/idna/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package idna
diff --git a/internal/export/idna/tables11.0.0.go b/internal/export/idna/tables11.0.0.go
index 8ce0811..167efba 100644
--- a/internal/export/idna/tables11.0.0.go
+++ b/internal/export/idna/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package idna
diff --git a/internal/export/idna/tables12.0.0.go b/internal/export/idna/tables12.0.0.go
index f39f0cb..ab40f7b 100644
--- a/internal/export/idna/tables12.0.0.go
+++ b/internal/export/idna/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package idna
diff --git a/internal/export/idna/tables13.0.0.go b/internal/export/idna/tables13.0.0.go
index e8c7a36..390c5e5 100644
--- a/internal/export/idna/tables13.0.0.go
+++ b/internal/export/idna/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package idna
diff --git a/internal/export/idna/tables9.0.0.go b/internal/export/idna/tables9.0.0.go
index 8b65fa1..4074b53 100644
--- a/internal/export/idna/tables9.0.0.go
+++ b/internal/export/idna/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package idna
diff --git a/internal/export/unicode/gen.go b/internal/export/unicode/gen.go
index afdc94d..9e4114f 100644
--- a/internal/export/unicode/gen.go
+++ b/internal/export/unicode/gen.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
 
 // Unicode table generator.
diff --git a/internal/language/compact/gen.go b/internal/language/compact/gen.go
index 0c36a05..400c1f0 100644
--- a/internal/language/compact/gen.go
+++ b/internal/language/compact/gen.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
 
 // Language tag table generator.
diff --git a/internal/language/compact/gen_index.go b/internal/language/compact/gen_index.go
index 136cefa..51c0d2d 100644
--- a/internal/language/compact/gen_index.go
+++ b/internal/language/compact/gen_index.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
 
 package main
diff --git a/internal/language/compact/gen_parents.go b/internal/language/compact/gen_parents.go
index 9543d58..1f4a6e8 100644
--- a/internal/language/compact/gen_parents.go
+++ b/internal/language/compact/gen_parents.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
 
 package main
diff --git a/internal/language/gen.go b/internal/language/gen.go
index cdcc7fe..27c43dc 100644
--- a/internal/language/gen.go
+++ b/internal/language/gen.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
 
 // Language tag table generator.
diff --git a/internal/language/gen_common.go b/internal/language/gen_common.go
index c419cee..84dd4de 100644
--- a/internal/language/gen_common.go
+++ b/internal/language/gen_common.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
 
 package main
diff --git a/internal/number/gen.go b/internal/number/gen.go
index c836221..5341747 100644
--- a/internal/number/gen.go
+++ b/internal/number/gen.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
 
 package main
diff --git a/internal/number/gen_common.go b/internal/number/gen_common.go
index b1b41a7..f20ad7f 100644
--- a/internal/number/gen_common.go
+++ b/internal/number/gen_common.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
 
 package main
diff --git a/internal/testtext/gc.go b/internal/testtext/gc.go
index a54e1bc..a6365f9 100644
--- a/internal/testtext/gc.go
+++ b/internal/testtext/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 !gccgo
 // +build !gccgo
 
 package testtext
diff --git a/internal/testtext/gccgo.go b/internal/testtext/gccgo.go
index 30e98ef..e880af3 100644
--- a/internal/testtext/gccgo.go
+++ b/internal/testtext/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 testtext
diff --git a/internal/testtext/go1_6.go b/internal/testtext/go1_6.go
index 7b23847..f633e89 100644
--- a/internal/testtext/go1_6.go
+++ b/internal/testtext/go1_6.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 testtext
diff --git a/internal/testtext/go1_7.go b/internal/testtext/go1_7.go
index 66f9cf7..228bf42 100644
--- a/internal/testtext/go1_7.go
+++ b/internal/testtext/go1_7.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 testtext
diff --git a/internal/triegen/data_test.go b/internal/triegen/data_test.go
index 91de547..a47efac 100644
--- a/internal/triegen/data_test.go
+++ b/internal/triegen/data_test.go
@@ -1,4 +1,5 @@
 // This file is generated with "go test -tags generate". DO NOT EDIT!
+//go:build !generate
 // +build !generate
 
 package triegen_test
diff --git a/internal/triegen/gen_test.go b/internal/triegen/gen_test.go
index 831627d..6bd137d 100644
--- a/internal/triegen/gen_test.go
+++ b/internal/triegen/gen_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 generate
 // +build generate
 
 package triegen_test
diff --git a/language/display/maketables.go b/language/display/maketables.go
index b520e8a..a6cbcc6 100644
--- a/language/display/maketables.go
+++ b/language/display/maketables.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
 
 // Generator for display name tables.
diff --git a/language/gen.go b/language/gen.go
index 3004eb4..445882e 100644
--- a/language/gen.go
+++ b/language/gen.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
 
 // Language tag table generator.
diff --git a/language/go1_1.go b/language/go1_1.go
index 380f4c0..c743558 100644
--- a/language/go1_1.go
+++ b/language/go1_1.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.2
 // +build !go1.2
 
 package language
diff --git a/language/go1_2.go b/language/go1_2.go
index 38268c5..77aaaa2 100644
--- a/language/go1_2.go
+++ b/language/go1_2.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.2
 // +build go1.2
 
 package language
diff --git a/message/catalog/go19.go b/message/catalog/go19.go
index 147fc7c..4e5e87f 100644
--- a/message/catalog/go19.go
+++ b/message/catalog/go19.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 catalog
diff --git a/message/catalog/gopre19.go b/message/catalog/gopre19.go
index a9753b9..9e14685 100644
--- a/message/catalog/gopre19.go
+++ b/message/catalog/gopre19.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 catalog
diff --git a/message/pipeline/go19_test.go b/message/pipeline/go19_test.go
index c9517c1..10d9eda 100644
--- a/message/pipeline/go19_test.go
+++ b/message/pipeline/go19_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.9
 // +build go1.9
 
 package pipeline
diff --git a/secure/bidirule/bidirule10.0.0.go b/secure/bidirule/bidirule10.0.0.go
index e4c6228..8a7392c 100644
--- a/secure/bidirule/bidirule10.0.0.go
+++ b/secure/bidirule/bidirule10.0.0.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.10
 // +build go1.10
 
 package bidirule
diff --git a/secure/bidirule/bidirule10.0.0_test.go b/secure/bidirule/bidirule10.0.0_test.go
index 06ec5f5..dd5271c 100644
--- a/secure/bidirule/bidirule10.0.0_test.go
+++ b/secure/bidirule/bidirule10.0.0_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.10
 // +build go1.10
 
 package bidirule
diff --git a/secure/bidirule/bidirule9.0.0.go b/secure/bidirule/bidirule9.0.0.go
index 02b9e1e..bb0a920 100644
--- a/secure/bidirule/bidirule9.0.0.go
+++ b/secure/bidirule/bidirule9.0.0.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.10
 // +build !go1.10
 
 package bidirule
diff --git a/secure/bidirule/bidirule9.0.0_test.go b/secure/bidirule/bidirule9.0.0_test.go
index 008874e..e0bd1b4 100644
--- a/secure/bidirule/bidirule9.0.0_test.go
+++ b/secure/bidirule/bidirule9.0.0_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.10
 // +build !go1.10
 
 package bidirule
diff --git a/secure/precis/benchmark_test.go b/secure/precis/benchmark_test.go
index 6337d00..faed654 100644
--- a/secure/precis/benchmark_test.go
+++ b/secure/precis/benchmark_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 precis
diff --git a/secure/precis/enforce10.0.0_test.go b/secure/precis/enforce10.0.0_test.go
index 34da150..7dd7bd5 100644
--- a/secure/precis/enforce10.0.0_test.go
+++ b/secure/precis/enforce10.0.0_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.10
 // +build go1.10
 
 package precis
diff --git a/secure/precis/enforce9.0.0_test.go b/secure/precis/enforce9.0.0_test.go
index 2097455..98765cd 100644
--- a/secure/precis/enforce9.0.0_test.go
+++ b/secure/precis/enforce9.0.0_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.10
 // +build !go1.10
 
 package precis
diff --git a/secure/precis/gen.go b/secure/precis/gen.go
index 946acba..99ead42 100644
--- a/secure/precis/gen.go
+++ b/secure/precis/gen.go
@@ -5,6 +5,7 @@
 // Unicode table generator.
 // Data read from the web.
 
+//go:build ignore
 // +build ignore
 
 package main
diff --git a/secure/precis/gen_trieval.go b/secure/precis/gen_trieval.go
index 308510c..6fc5d1e 100644
--- a/secure/precis/gen_trieval.go
+++ b/secure/precis/gen_trieval.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
 
 package main
diff --git a/secure/precis/tables10.0.0.go b/secure/precis/tables10.0.0.go
index 362d272..8164749 100644
--- a/secure/precis/tables10.0.0.go
+++ b/secure/precis/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package precis
diff --git a/secure/precis/tables11.0.0.go b/secure/precis/tables11.0.0.go
index 0db5a9e..a40e55d 100644
--- a/secure/precis/tables11.0.0.go
+++ b/secure/precis/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package precis
diff --git a/secure/precis/tables12.0.0.go b/secure/precis/tables12.0.0.go
index a239289..254bbc7 100644
--- a/secure/precis/tables12.0.0.go
+++ b/secure/precis/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package precis
diff --git a/secure/precis/tables13.0.0.go b/secure/precis/tables13.0.0.go
index e3ddd73..aad68b3 100644
--- a/secure/precis/tables13.0.0.go
+++ b/secure/precis/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package precis
diff --git a/secure/precis/tables9.0.0.go b/secure/precis/tables9.0.0.go
index dacaf6a..2292b7c 100644
--- a/secure/precis/tables9.0.0.go
+++ b/secure/precis/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package precis
diff --git a/unicode/bidi/gen.go b/unicode/bidi/gen.go
index 987fc16..ab2b8bf 100644
--- a/unicode/bidi/gen.go
+++ b/unicode/bidi/gen.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
 
 package main
diff --git a/unicode/bidi/gen_ranges.go b/unicode/bidi/gen_ranges.go
index 02c3b50..10f0989 100644
--- a/unicode/bidi/gen_ranges.go
+++ b/unicode/bidi/gen_ranges.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
 
 package main
diff --git a/unicode/bidi/gen_trieval.go b/unicode/bidi/gen_trieval.go
index 9cb9942..eac0f76 100644
--- a/unicode/bidi/gen_trieval.go
+++ b/unicode/bidi/gen_trieval.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
 
 package main
diff --git a/unicode/bidi/tables10.0.0.go b/unicode/bidi/tables10.0.0.go
index d8c94e1..42fa8d7 100644
--- a/unicode/bidi/tables10.0.0.go
+++ b/unicode/bidi/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package bidi
diff --git a/unicode/bidi/tables11.0.0.go b/unicode/bidi/tables11.0.0.go
index 16b11db..56a0e1e 100644
--- a/unicode/bidi/tables11.0.0.go
+++ b/unicode/bidi/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package bidi
diff --git a/unicode/bidi/tables12.0.0.go b/unicode/bidi/tables12.0.0.go
index 647f2d4..baacf32 100644
--- a/unicode/bidi/tables12.0.0.go
+++ b/unicode/bidi/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package bidi
diff --git a/unicode/bidi/tables13.0.0.go b/unicode/bidi/tables13.0.0.go
index c937d09..f248eff 100644
--- a/unicode/bidi/tables13.0.0.go
+++ b/unicode/bidi/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package bidi
diff --git a/unicode/bidi/tables9.0.0.go b/unicode/bidi/tables9.0.0.go
index 0ca0193..f517fdb 100644
--- a/unicode/bidi/tables9.0.0.go
+++ b/unicode/bidi/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package bidi
diff --git a/unicode/cldr/makexml.go b/unicode/cldr/makexml.go
index eb26306..3c1fd26 100644
--- a/unicode/cldr/makexml.go
+++ b/unicode/cldr/makexml.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 tool generates types for the various XML formats of CLDR.
diff --git a/unicode/norm/data10.0.0_test.go b/unicode/norm/data10.0.0_test.go
index 56441e7..54ee4d2 100644
--- a/unicode/norm/data10.0.0_test.go
+++ b/unicode/norm/data10.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package norm
diff --git a/unicode/norm/data11.0.0_test.go b/unicode/norm/data11.0.0_test.go
index ee8ec8b..5b0e037 100644
--- a/unicode/norm/data11.0.0_test.go
+++ b/unicode/norm/data11.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package norm
diff --git a/unicode/norm/data12.0.0_test.go b/unicode/norm/data12.0.0_test.go
index 1555292..48cdbc5 100644
--- a/unicode/norm/data12.0.0_test.go
+++ b/unicode/norm/data12.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package norm
diff --git a/unicode/norm/data13.0.0_test.go b/unicode/norm/data13.0.0_test.go
index 9455866..3c390d0 100644
--- a/unicode/norm/data13.0.0_test.go
+++ b/unicode/norm/data13.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package norm
diff --git a/unicode/norm/data9.0.0_test.go b/unicode/norm/data9.0.0_test.go
index b1be64d..77175bc 100644
--- a/unicode/norm/data9.0.0_test.go
+++ b/unicode/norm/data9.0.0_test.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package norm
diff --git a/unicode/norm/forminfo_test.go b/unicode/norm/forminfo_test.go
index e15ba9b..96f0970 100644
--- a/unicode/norm/forminfo_test.go
+++ b/unicode/norm/forminfo_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 test
 // +build test
 
 package norm
diff --git a/unicode/norm/maketables.go b/unicode/norm/maketables.go
index 30a3aa9..0d24d21 100644
--- a/unicode/norm/maketables.go
+++ b/unicode/norm/maketables.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
 
 // Normalization table generator.
diff --git a/unicode/norm/tables10.0.0.go b/unicode/norm/tables10.0.0.go
index 26fbd55..f5a0788 100644
--- a/unicode/norm/tables10.0.0.go
+++ b/unicode/norm/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package norm
diff --git a/unicode/norm/tables11.0.0.go b/unicode/norm/tables11.0.0.go
index 2c58f09..cb7239c 100644
--- a/unicode/norm/tables11.0.0.go
+++ b/unicode/norm/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package norm
diff --git a/unicode/norm/tables12.0.0.go b/unicode/norm/tables12.0.0.go
index 7e1ae09..11b2733 100644
--- a/unicode/norm/tables12.0.0.go
+++ b/unicode/norm/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package norm
diff --git a/unicode/norm/tables13.0.0.go b/unicode/norm/tables13.0.0.go
index 9ea1b42..96a130d 100644
--- a/unicode/norm/tables13.0.0.go
+++ b/unicode/norm/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package norm
diff --git a/unicode/norm/tables9.0.0.go b/unicode/norm/tables9.0.0.go
index 9429069..0175eae 100644
--- a/unicode/norm/tables9.0.0.go
+++ b/unicode/norm/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package norm
diff --git a/unicode/norm/triegen.go b/unicode/norm/triegen.go
index 45d7119..cce6435 100644
--- a/unicode/norm/triegen.go
+++ b/unicode/norm/triegen.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
 
 // Trie table generator.
diff --git a/unicode/rangetable/gen.go b/unicode/rangetable/gen.go
index c2d3674..fc4eee0 100644
--- a/unicode/rangetable/gen.go
+++ b/unicode/rangetable/gen.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
 
 package main
diff --git a/unicode/rangetable/tables10.0.0.go b/unicode/rangetable/tables10.0.0.go
index 3dfcd82..a34fbe2 100644
--- a/unicode/rangetable/tables10.0.0.go
+++ b/unicode/rangetable/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package rangetable
diff --git a/unicode/rangetable/tables11.0.0.go b/unicode/rangetable/tables11.0.0.go
index 1df829f..31949f0 100644
--- a/unicode/rangetable/tables11.0.0.go
+++ b/unicode/rangetable/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package rangetable
diff --git a/unicode/rangetable/tables12.0.0.go b/unicode/rangetable/tables12.0.0.go
index e9d25c5..9d4d724 100644
--- a/unicode/rangetable/tables12.0.0.go
+++ b/unicode/rangetable/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package rangetable
diff --git a/unicode/rangetable/tables13.0.0.go b/unicode/rangetable/tables13.0.0.go
index 921e4f7..3dcaad4 100644
--- a/unicode/rangetable/tables13.0.0.go
+++ b/unicode/rangetable/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package rangetable
diff --git a/unicode/rangetable/tables9.0.0.go b/unicode/rangetable/tables9.0.0.go
index aef876d..32a7ac1 100644
--- a/unicode/rangetable/tables9.0.0.go
+++ b/unicode/rangetable/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package rangetable
diff --git a/unicode/runenames/gen.go b/unicode/runenames/gen.go
index 5633ba6..4f4a020 100644
--- a/unicode/runenames/gen.go
+++ b/unicode/runenames/gen.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
 
 package main
diff --git a/unicode/runenames/tables10.0.0.go b/unicode/runenames/tables10.0.0.go
index e74a21c..9ff9ad9 100644
--- a/unicode/runenames/tables10.0.0.go
+++ b/unicode/runenames/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package runenames
diff --git a/unicode/runenames/tables11.0.0.go b/unicode/runenames/tables11.0.0.go
index 8b41b53..ba17988 100644
--- a/unicode/runenames/tables11.0.0.go
+++ b/unicode/runenames/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package runenames
diff --git a/unicode/runenames/tables12.0.0.go b/unicode/runenames/tables12.0.0.go
index 4f71b9a..7355a56 100644
--- a/unicode/runenames/tables12.0.0.go
+++ b/unicode/runenames/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package runenames
diff --git a/unicode/runenames/tables13.0.0.go b/unicode/runenames/tables13.0.0.go
index b08f648..4b74848 100644
--- a/unicode/runenames/tables13.0.0.go
+++ b/unicode/runenames/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package runenames
diff --git a/unicode/runenames/tables9.0.0.go b/unicode/runenames/tables9.0.0.go
index 912c396..0e8d955 100644
--- a/unicode/runenames/tables9.0.0.go
+++ b/unicode/runenames/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package runenames
diff --git a/width/gen.go b/width/gen.go
index 092277e..36e4156 100644
--- a/width/gen.go
+++ b/width/gen.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 program generates the trie for width operations. The generated table
diff --git a/width/gen_common.go b/width/gen_common.go
index 601e752..24c49ff 100644
--- a/width/gen_common.go
+++ b/width/gen_common.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
 
 package main
diff --git a/width/gen_trieval.go b/width/gen_trieval.go
index c17334a..cf1a3b2 100644
--- a/width/gen_trieval.go
+++ b/width/gen_trieval.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
 
 package main
diff --git a/width/tables10.0.0.go b/width/tables10.0.0.go
index decb8e4..186b1d4 100644
--- a/width/tables10.0.0.go
+++ b/width/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package width
diff --git a/width/tables11.0.0.go b/width/tables11.0.0.go
index 3c75e42..990f762 100644
--- a/width/tables11.0.0.go
+++ b/width/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package width
diff --git a/width/tables12.0.0.go b/width/tables12.0.0.go
index 543942b..8529629 100644
--- a/width/tables12.0.0.go
+++ b/width/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package width
diff --git a/width/tables13.0.0.go b/width/tables13.0.0.go
index 804264c..bac3f1a 100644
--- a/width/tables13.0.0.go
+++ b/width/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package width
diff --git a/width/tables9.0.0.go b/width/tables9.0.0.go
index 7069e26..b3db84f 100644
--- a/width/tables9.0.0.go
+++ b/width/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package width