all: gofmt

Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: Iac828c845b6d7ae0eab93fcf007f3ef8e16c8ed7
Reviewed-on: https://go-review.googlesource.com/c/exp/+/399614
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
diff --git a/apidiff/compatibility.go b/apidiff/compatibility.go
index f78da8f..44238fb 100644
--- a/apidiff/compatibility.go
+++ b/apidiff/compatibility.go
@@ -134,13 +134,16 @@
 }
 
 // We need to check three things for structs:
-// 1. The set of exported fields must be compatible. This ensures that keyed struct
-//    literals continue to compile. (There is no compatibility guarantee for unkeyed
-//    struct literals.)
-// 2. The set of exported *selectable* fields must be compatible. This includes the exported
-//    fields of all embedded structs. This ensures that selections continue to compile.
-// 3. If the old struct is comparable, so must the new one be. This ensures that equality
-//    expressions and uses of struct values as map keys continue to compile.
+//
+//  1. The set of exported fields must be compatible. This ensures that keyed struct
+//     literals continue to compile. (There is no compatibility guarantee for unkeyed
+//     struct literals.)
+//
+//  2. The set of exported *selectable* fields must be compatible. This includes the exported
+//     fields of all embedded structs. This ensures that selections continue to compile.
+//
+//  3. If the old struct is comparable, so must the new one be. This ensures that equality
+//     expressions and uses of struct values as map keys continue to compile.
 //
 // An unexported embedded struct can't appear in a struct literal outside the
 // package, so it doesn't have to be present, or have the same name, in the new
diff --git a/apidiff/testdata/exported_fields/ef.go b/apidiff/testdata/exported_fields/ef.go
index 19da716..8e441e2 100644
--- a/apidiff/testdata/exported_fields/ef.go
+++ b/apidiff/testdata/exported_fields/ef.go
@@ -2,11 +2,12 @@
 
 // Used for testing exportedFields.
 // Its exported fields are:
-//   A1 [1]int
-//   D bool
-//   E int
-//   F F
-//   S *S
+//
+//	A1 [1]int
+//	D bool
+//	E int
+//	F F
+//	S *S
 type (
 	S struct {
 		int
diff --git a/apidiff/testdata/tests.go b/apidiff/testdata/tests.go
index 014e813..61e9026 100644
--- a/apidiff/testdata/tests.go
+++ b/apidiff/testdata/tests.go
@@ -1,12 +1,12 @@
 // This file is split into two packages, old and new.
 // It is syntactically valid Go so that gofmt can process it.
 //
-// If a comment begins with:   Then:
-//  old                        write subsequent lines to the "old" package
-//  new                        write subsequent lines to the "new" package
-//  both                       write subsequent lines to both packages
-//  c                          expect a compatible error with the following text
-//  i                          expect an incompatible error with the following text
+//	If a comment begins with:  Then:
+//	old                        write subsequent lines to the "old" package
+//	new                        write subsequent lines to the "new" package
+//	both                       write subsequent lines to both packages
+//	c                          expect a compatible error with the following text
+//	i                          expect an incompatible error with the following text
 package ignore
 
 // both
@@ -14,11 +14,11 @@
 
 //////////////// Basics
 
-//// Same type in both: OK.
+// Same type in both: OK.
 // both
 type A int
 
-//// Changing the type is an incompatible change.
+// Changing the type is an incompatible change.
 // old
 type B int
 
@@ -26,7 +26,7 @@
 // i B: changed from int to string
 type B string
 
-//// Adding a new type, whether alias or not, is a compatible change.
+// Adding a new type, whether alias or not, is a compatible change.
 // new
 // c AA: added
 type AA = A
@@ -34,14 +34,14 @@
 // c B1: added
 type B1 bool
 
-//// Change of type for an unexported name doesn't matter...
+// Change of type for an unexported name doesn't matter...
 // old
 type t int
 
 // new
 type t string // OK: t isn't part of the API
 
-//// ...unless it is exposed.
+// ...unless it is exposed.
 // both
 var V2 u
 
@@ -52,7 +52,7 @@
 // i u: changed from string to int
 type u int
 
-//// An exposed, unexported type can be renamed.
+// An exposed, unexported type can be renamed.
 // both
 type u2 int
 
@@ -64,7 +64,7 @@
 // new
 var V5 u2 // OK: V5 has changed type, but old u1 corresopnds to new u2
 
-//// Splitting a single type into two is an incompatible change.
+// Splitting a single type into two is an incompatible change.
 // both
 type u3 int
 
@@ -83,7 +83,7 @@
 	Split2 = u3
 )
 
-//// Merging two types into one is OK.
+// Merging two types into one is OK.
 // old
 type (
 	GoodMerge1 = u2
@@ -96,7 +96,7 @@
 	GoodMerge2 = u3
 )
 
-//// Merging isn't OK here because a method is lost.
+// Merging isn't OK here because a method is lost.
 // both
 type u4 int
 
@@ -125,7 +125,7 @@
 
 //////////////// Constants
 
-//// type changes
+// type changes
 // old
 const (
 	C1     = 1
@@ -172,7 +172,7 @@
 
 //////////////// Variables
 
-//// simple type changes
+// simple type changes
 // old
 var (
 	V1 string
@@ -189,7 +189,7 @@
 	V7 chan int
 )
 
-//// interface type  changes
+// interface type  changes
 // old
 var (
 	V9  interface{ M() }
@@ -210,7 +210,7 @@
 	V11 interface{ M(int) }
 )
 
-//// struct type changes
+// struct type changes
 // old
 var (
 	VS1 struct{ A, B int }
@@ -413,7 +413,8 @@
 // i I5: changed from io.Writer to I5
 // In old, I5 and io.Writer are the same type; in new,
 // they are different. That can break something like:
-//   var _ func(io.Writer) = func(pkg.I6) {}
+//
+//	var _ func(io.Writer) = func(pkg.I6) {}
 type I5 io.Writer
 
 // old
@@ -471,7 +472,9 @@
 
 // i VT4: changed from int to t4
 // This is incompatible because of code like
-//    VT4 + int(1)
+//
+//	VT4 + int(1)
+//
 // which works in old but fails in new.
 // The difference from the above cases is that
 // in those, we were merging two types into one;
@@ -627,7 +630,7 @@
 	*S4 // OK: same (recursive embedding)
 }
 
-//// Difference between exported selectable fields and exported immediate fields.
+// Difference between exported selectable fields and exported immediate fields.
 // both
 type S5 struct{ A int }
 
@@ -648,7 +651,7 @@
 	S5
 }
 
-//// Ambiguous fields can exist; they just can't be selected.
+// Ambiguous fields can exist; they just can't be selected.
 // both
 type (
 	embed7a struct{ E int }
@@ -870,7 +873,7 @@
 
 //// Splitting types
 
-//// OK: in both old and new, {J1, K1, L1} name the same type.
+// OK: in both old and new, {J1, K1, L1} name the same type.
 // old
 type (
 	J1 = K1
@@ -885,7 +888,7 @@
 	L1 = J1
 )
 
-//// Old has one type, K2; new has J2 and K2.
+// Old has one type, K2; new has J2 and K2.
 // both
 type K2 int
 
diff --git a/cmd/gorelease/gorelease.go b/cmd/gorelease/gorelease.go
index 340d81f..b0ee1e9 100644
--- a/cmd/gorelease/gorelease.go
+++ b/cmd/gorelease/gorelease.go
@@ -7,21 +7,21 @@
 //
 // Usage:
 //
-//    gorelease [-base={version|none}] [-version=version]
+//	gorelease [-base={version|none}] [-version=version]
 //
 // Examples:
 //
-//    # Compare with the latest version and suggest a new version.
-//    gorelease
+//	# Compare with the latest version and suggest a new version.
+//	gorelease
 //
-//    # Compare with a specific version and suggest a new version.
-//    gorelease -base=v1.2.3
+//	# Compare with a specific version and suggest a new version.
+//	gorelease -base=v1.2.3
 //
-//    # Compare with the latest version and check a specific new version for compatibility.
-//    gorelease -version=v1.3.0
+//	# Compare with the latest version and check a specific new version for compatibility.
+//	gorelease -version=v1.3.0
 //
-//    # Compare with a specific version and check a specific new version for compatibility.
-//    gorelease -base=v1.2.3 -version=v1.3.0
+//	# Compare with a specific version and check a specific new version for compatibility.
+//	gorelease -base=v1.2.3 -version=v1.3.0
 //
 // gorelease analyzes changes in the public API and dependencies of the main
 // module. It compares a base version (set with -base) with the currently
diff --git a/cmd/macos-roots-test/root_darwin.go b/cmd/macos-roots-test/root_darwin.go
index 25cbcd1..b5bf0f7 100644
--- a/cmd/macos-roots-test/root_darwin.go
+++ b/cmd/macos-roots-test/root_darwin.go
@@ -29,12 +29,12 @@
 //
 // The strategy is as follows:
 //
-// 1. Run "security find-certificate" to dump the list of system root
-//    CAs in PEM format.
+//  1. Run "security find-certificate" to dump the list of system root
+//     CAs in PEM format.
 //
-// 2. For each dumped cert, conditionally verify it with "security
-//    verify-cert" if that cert was not in the SystemRootCertificates
-//    keychain, which can't have custom trust policies.
+//  2. For each dumped cert, conditionally verify it with "security
+//     verify-cert" if that cert was not in the SystemRootCertificates
+//     keychain, which can't have custom trust policies.
 //
 // We need to run "verify-cert" for all certificates not in SystemRootCertificates
 // because there might be certificates in the keychains without a corresponding
diff --git a/cmd/txtar/txtar.go b/cmd/txtar/txtar.go
index 072f416..9beb163 100644
--- a/cmd/txtar/txtar.go
+++ b/cmd/txtar/txtar.go
@@ -25,10 +25,9 @@
 //
 // Example usage:
 //
-// 	txtar *.go <README >testdata/example.txt
+//	txtar *.go <README >testdata/example.txt
 //
-// 	txtar --extract <playground_example.txt >main.go
-//
+//	txtar --extract <playground_example.txt >main.go
 package main
 
 import (
diff --git a/ebnf/ebnf.go b/ebnf/ebnf.go
index ef1f946..a4e20f0 100644
--- a/ebnf/ebnf.go
+++ b/ebnf/ebnf.go
@@ -19,7 +19,6 @@
 // non-terminal productions (i.e., productions which allow white-space
 // and comments between tokens); all other production names denote
 // lexical productions.
-//
 package ebnf // import "golang.org/x/exp/ebnf"
 
 import (
@@ -256,12 +255,11 @@
 }
 
 // Verify checks that:
-//	- all productions used are defined
-//	- all productions defined are used when beginning at start
-//	- lexical productions refer only to other lexical productions
+//   - all productions used are defined
+//   - all productions defined are used when beginning at start
+//   - lexical productions refer only to other lexical productions
 //
 // Position information is interpreted relative to the file set fset.
-//
 func Verify(grammar Grammar, start string) error {
 	var v verifier
 	v.verify(grammar, start)
diff --git a/ebnf/parser.go b/ebnf/parser.go
index fd676bc..7aa7a70 100644
--- a/ebnf/parser.go
+++ b/ebnf/parser.go
@@ -182,7 +182,6 @@
 // for incorrect syntax and if a production is declared
 // more than once; the filename is used only for error
 // positions.
-//
 func Parse(filename string, src io.Reader) (Grammar, error) {
 	var p parser
 	grammar := p.parse(filename, src)
diff --git a/ebnflint/doc.go b/ebnflint/doc.go
index 3080b58..79d3a66 100644
--- a/ebnflint/doc.go
+++ b/ebnflint/doc.go
@@ -3,20 +3,19 @@
 // license that can be found in the LICENSE file.
 
 /*
-
 Ebnflint verifies that EBNF productions are consistent and grammatically correct.
 It reads them from an HTML document such as the Go specification.
 
 Grammar productions are grouped in boxes demarcated by the HTML elements
+
 	<pre class="ebnf">
 	</pre>
 
-
 Usage:
+
 	go tool ebnflint [--start production] [file]
 
 The --start flag specifies the name of the start production for
 the grammar; it defaults to "Start".
-
 */
 package main // import "golang.org/x/exp/ebnflint"
diff --git a/errors/errors.go b/errors/errors.go
index 39d7c5e..bcd705d 100644
--- a/errors/errors.go
+++ b/errors/errors.go
@@ -5,7 +5,8 @@
 // Package errors implements functions to manipulate errors.
 //
 // This package implements the Go 2 draft designs for error inspection and printing:
-//   https://go.googlesource.com/proposal/+/master/design/go2draft.md
+//
+//	https://go.googlesource.com/proposal/+/master/design/go2draft.md
 //
 // This is an EXPERIMENTAL package, and may change in arbitrary ways without notice.
 package errors
diff --git a/errors/fmt/doc.go b/errors/fmt/doc.go
index 72aee6b..56bd157 100644
--- a/errors/fmt/doc.go
+++ b/errors/fmt/doc.go
@@ -3,344 +3,378 @@
 // license that can be found in the LICENSE file.
 
 /*
-	Package fmt implements formatted I/O with functions analogous
-	to C's printf and scanf.  The format 'verbs' are derived from C's but
-	are simpler.
+Package fmt implements formatted I/O with functions analogous
+to C's printf and scanf.  The format 'verbs' are derived from C's but
+are simpler.
 
+# Printing
 
-	Printing
+The verbs:
 
-	The verbs:
+General:
 
-	General:
-		%v	the value in a default format
-			when printing structs, the plus flag (%+v) adds field names
-		%#v	a Go-syntax representation of the value
-		%T	a Go-syntax representation of the type of the value
-		%%	a literal percent sign; consumes no value
+	%v	the value in a default format
+		when printing structs, the plus flag (%+v) adds field names
+	%#v	a Go-syntax representation of the value
+	%T	a Go-syntax representation of the type of the value
+	%%	a literal percent sign; consumes no value
 
-	Boolean:
-		%t	the word true or false
-	Integer:
-		%b	base 2
-		%c	the character represented by the corresponding Unicode code point
-		%d	base 10
-		%o	base 8
-		%q	a single-quoted character literal safely escaped with Go syntax.
-		%x	base 16, with lower-case letters for a-f
-		%X	base 16, with upper-case letters for A-F
-		%U	Unicode format: U+1234; same as "U+%04X"
-	Floating-point and complex constituents:
-		%b	decimalless scientific notation with exponent a power of two,
-			in the manner of strconv.FormatFloat with the 'b' format,
-			e.g. -123456p-78
-		%e	scientific notation, e.g. -1.234456e+78
-		%E	scientific notation, e.g. -1.234456E+78
-		%f	decimal point but no exponent, e.g. 123.456
-		%F	synonym for %f
-		%g	%e for large exponents, %f otherwise. Precision is discussed below.
-		%G	%E for large exponents, %F otherwise
-	String and slice of bytes (treated equivalently with these verbs):
-		%s	the uninterpreted bytes of the string or slice
-		%q	a double-quoted string safely escaped with Go syntax
-		%x	base 16, lower-case, two characters per byte
-		%X	base 16, upper-case, two characters per byte
-	Slice:
-		%p	address of 0th element in base 16 notation, with leading 0x
-	Pointer:
-		%p	base 16 notation, with leading 0x
-		The %b, %d, %o, %x and %X verbs also work with pointers,
-		formatting the value exactly as if it were an integer.
+Boolean:
 
-	The default format for %v is:
-		bool:                    %t
-		int, int8 etc.:          %d
-		uint, uint8 etc.:        %d, %#x if printed with %#v
-		float32, complex64, etc: %g
-		string:                  %s
-		chan:                    %p
-		pointer:                 %p
-	For compound objects, the elements are printed using these rules, recursively,
-	laid out like this:
-		struct:             {field0 field1 ...}
-		array, slice:       [elem0 elem1 ...]
-		maps:               map[key1:value1 key2:value2 ...]
-		pointer to above:   &{}, &[], &map[]
+	%t	the word true or false
 
-	Width is specified by an optional decimal number immediately preceding the verb.
-	If absent, the width is whatever is necessary to represent the value.
-	Precision is specified after the (optional) width by a period followed by a
-	decimal number. If no period is present, a default precision is used.
-	A period with no following number specifies a precision of zero.
-	Examples:
-		%f     default width, default precision
-		%9f    width 9, default precision
-		%.2f   default width, precision 2
-		%9.2f  width 9, precision 2
-		%9.f   width 9, precision 0
+Integer:
 
-	Width and precision are measured in units of Unicode code points,
-	that is, runes. (This differs from C's printf where the
-	units are always measured in bytes.) Either or both of the flags
-	may be replaced with the character '*', causing their values to be
-	obtained from the next operand (preceding the one to format),
-	which must be of type int.
+	%b	base 2
+	%c	the character represented by the corresponding Unicode code point
+	%d	base 10
+	%o	base 8
+	%q	a single-quoted character literal safely escaped with Go syntax.
+	%x	base 16, with lower-case letters for a-f
+	%X	base 16, with upper-case letters for A-F
+	%U	Unicode format: U+1234; same as "U+%04X"
 
-	For most values, width is the minimum number of runes to output,
-	padding the formatted form with spaces if necessary.
+Floating-point and complex constituents:
 
-	For strings, byte slices and byte arrays, however, precision
-	limits the length of the input to be formatted (not the size of
-	the output), truncating if necessary. Normally it is measured in
-	runes, but for these types when formatted with the %x or %X format
-	it is measured in bytes.
+	%b	decimalless scientific notation with exponent a power of two,
+		in the manner of strconv.FormatFloat with the 'b' format,
+		e.g. -123456p-78
+	%e	scientific notation, e.g. -1.234456e+78
+	%E	scientific notation, e.g. -1.234456E+78
+	%f	decimal point but no exponent, e.g. 123.456
+	%F	synonym for %f
+	%g	%e for large exponents, %f otherwise. Precision is discussed below.
+	%G	%E for large exponents, %F otherwise
 
-	For floating-point values, width sets the minimum width of the field and
-	precision sets the number of places after the decimal, if appropriate,
-	except that for %g/%G precision sets the maximum number of significant
-	digits (trailing zeros are removed). For example, given 12.345 the format
-	%6.3f prints 12.345 while %.3g prints 12.3. The default precision for %e, %f
-	and %#g is 6; for %g it is the smallest number of digits necessary to identify
-	the value uniquely.
+String and slice of bytes (treated equivalently with these verbs):
 
-	For complex numbers, the width and precision apply to the two
-	components independently and the result is parenthesized, so %f applied
-	to 1.2+3.4i produces (1.200000+3.400000i).
+	%s	the uninterpreted bytes of the string or slice
+	%q	a double-quoted string safely escaped with Go syntax
+	%x	base 16, lower-case, two characters per byte
+	%X	base 16, upper-case, two characters per byte
 
-	Other flags:
-		+	always print a sign for numeric values;
-			guarantee ASCII-only output for %q (%+q)
-		-	pad with spaces on the right rather than the left (left-justify the field)
-		#	alternate format: add leading 0 for octal (%#o), 0x for hex (%#x);
-			0X for hex (%#X); suppress 0x for %p (%#p);
-			for %q, print a raw (backquoted) string if strconv.CanBackquote
-			returns true;
-			always print a decimal point for %e, %E, %f, %F, %g and %G;
-			do not remove trailing zeros for %g and %G;
-			write e.g. U+0078 'x' if the character is printable for %U (%#U).
-		' '	(space) leave a space for elided sign in numbers (% d);
-			put spaces between bytes printing strings or slices in hex (% x, % X)
-		0	pad with leading zeros rather than spaces;
-			for numbers, this moves the padding after the sign
+Slice:
 
-	Flags are ignored by verbs that do not expect them.
-	For example there is no alternate decimal format, so %#d and %d
-	behave identically.
+	%p	address of 0th element in base 16 notation, with leading 0x
 
-	For each Printf-like function, there is also a Print function
-	that takes no format and is equivalent to saying %v for every
-	operand.  Another variant Println inserts blanks between
-	operands and appends a newline.
+Pointer:
 
-	Regardless of the verb, if an operand is an interface value,
-	the internal concrete value is used, not the interface itself.
-	Thus:
-		var i interface{} = 23
-		fmt.Printf("%v\n", i)
-	will print 23.
+	%p	base 16 notation, with leading 0x
+	The %b, %d, %o, %x and %X verbs also work with pointers,
+	formatting the value exactly as if it were an integer.
 
-	Except when printed using the verbs %T and %p, special
-	formatting considerations apply for operands that implement
-	certain interfaces. In order of application:
+The default format for %v is:
 
-	1. If the operand is a reflect.Value, the operand is replaced by the
-	concrete value that it holds, and printing continues with the next rule.
+	bool:                    %t
+	int, int8 etc.:          %d
+	uint, uint8 etc.:        %d, %#x if printed with %#v
+	float32, complex64, etc: %g
+	string:                  %s
+	chan:                    %p
+	pointer:                 %p
 
-	2. If an operand implements the Formatter interface, and not
-	errors.Formatter, it will be invoked. Formatter provides fine
-	control of formatting.
+For compound objects, the elements are printed using these rules, recursively,
+laid out like this:
 
-	3. If the %v verb is used with the # flag (%#v) and the operand
-	implements the GoStringer interface, that will be invoked.
+	struct:             {field0 field1 ...}
+	array, slice:       [elem0 elem1 ...]
+	maps:               map[key1:value1 key2:value2 ...]
+	pointer to above:   &{}, &[], &map[]
 
-	If the format (which is implicitly %v for Println etc.) is valid
-	for a string (%s %q %v %x %X), the following three rules apply:
+Width is specified by an optional decimal number immediately preceding the verb.
+If absent, the width is whatever is necessary to represent the value.
+Precision is specified after the (optional) width by a period followed by a
+decimal number. If no period is present, a default precision is used.
+A period with no following number specifies a precision of zero.
+Examples:
 
-	4. If an operand implements errors.Formatter, the FormatError
-	method will be invoked with an errors.Printer to print the error.
-	If the %v flag is used with the + flag (%+v), the Detail method
-	of the Printer will return true and the error will be formatted
-	as a detailed error message. Otherwise the printed string will
-	be formatted as required by the verb (if any).
+	%f     default width, default precision
+	%9f    width 9, default precision
+	%.2f   default width, precision 2
+	%9.2f  width 9, precision 2
+	%9.f   width 9, precision 0
 
-	5. If an operand implements the error interface, the Error method
-	will be invoked to convert the object to a string, which will then
-	be formatted as required by the verb (if any).
+Width and precision are measured in units of Unicode code points,
+that is, runes. (This differs from C's printf where the
+units are always measured in bytes.) Either or both of the flags
+may be replaced with the character '*', causing their values to be
+obtained from the next operand (preceding the one to format),
+which must be of type int.
 
-	6. If an operand implements method String() string, that method
-	will be invoked to convert the object to a string, which will then
-	be formatted as required by the verb (if any).
+For most values, width is the minimum number of runes to output,
+padding the formatted form with spaces if necessary.
 
-	For compound operands such as slices and structs, the format
-	applies to the elements of each operand, recursively, not to the
-	operand as a whole. Thus %q will quote each element of a slice
-	of strings, and %6.2f will control formatting for each element
-	of a floating-point array.
+For strings, byte slices and byte arrays, however, precision
+limits the length of the input to be formatted (not the size of
+the output), truncating if necessary. Normally it is measured in
+runes, but for these types when formatted with the %x or %X format
+it is measured in bytes.
 
-	However, when printing a byte slice with a string-like verb
-	(%s %q %x %X), it is treated identically to a string, as a single item.
+For floating-point values, width sets the minimum width of the field and
+precision sets the number of places after the decimal, if appropriate,
+except that for %g/%G precision sets the maximum number of significant
+digits (trailing zeros are removed). For example, given 12.345 the format
+%6.3f prints 12.345 while %.3g prints 12.3. The default precision for %e, %f
+and %#g is 6; for %g it is the smallest number of digits necessary to identify
+the value uniquely.
 
-	To avoid recursion in cases such as
-		type X string
-		func (x X) String() string { return Sprintf("<%s>", x) }
-	convert the value before recurring:
-		func (x X) String() string { return Sprintf("<%s>", string(x)) }
-	Infinite recursion can also be triggered by self-referential data
-	structures, such as a slice that contains itself as an element, if
-	that type has a String method. Such pathologies are rare, however,
-	and the package does not protect against them.
+For complex numbers, the width and precision apply to the two
+components independently and the result is parenthesized, so %f applied
+to 1.2+3.4i produces (1.200000+3.400000i).
 
-	When printing a struct, fmt cannot and therefore does not invoke
-	formatting methods such as Error or String on unexported fields.
+Other flags:
+  - always print a sign for numeric values;
+    guarantee ASCII-only output for %q (%+q)
+  - pad with spaces on the right rather than the left (left-justify the field)
+    #	alternate format: add leading 0 for octal (%#o), 0x for hex (%#x);
+    0X for hex (%#X); suppress 0x for %p (%#p);
+    for %q, print a raw (backquoted) string if strconv.CanBackquote
+    returns true;
+    always print a decimal point for %e, %E, %f, %F, %g and %G;
+    do not remove trailing zeros for %g and %G;
+    write e.g. U+0078 'x' if the character is printable for %U (%#U).
+    ' '	(space) leave a space for elided sign in numbers (% d);
+    put spaces between bytes printing strings or slices in hex (% x, % X)
+    0	pad with leading zeros rather than spaces;
+    for numbers, this moves the padding after the sign
 
-	Explicit argument indexes:
+Flags are ignored by verbs that do not expect them.
+For example there is no alternate decimal format, so %#d and %d
+behave identically.
 
-	In Printf, Sprintf, and Fprintf, the default behavior is for each
-	formatting verb to format successive arguments passed in the call.
-	However, the notation [n] immediately before the verb indicates that the
-	nth one-indexed argument is to be formatted instead. The same notation
-	before a '*' for a width or precision selects the argument index holding
-	the value. After processing a bracketed expression [n], subsequent verbs
-	will use arguments n+1, n+2, etc. unless otherwise directed.
+For each Printf-like function, there is also a Print function
+that takes no format and is equivalent to saying %v for every
+operand.  Another variant Println inserts blanks between
+operands and appends a newline.
 
-	For example,
-		fmt.Sprintf("%[2]d %[1]d\n", 11, 22)
-	will yield "22 11", while
-		fmt.Sprintf("%[3]*.[2]*[1]f", 12.0, 2, 6)
-	equivalent to
-		fmt.Sprintf("%6.2f", 12.0)
-	will yield " 12.00". Because an explicit index affects subsequent verbs,
-	this notation can be used to print the same values multiple times
-	by resetting the index for the first argument to be repeated:
-		fmt.Sprintf("%d %d %#[1]x %#x", 16, 17)
-	will yield "16 17 0x10 0x11".
+Regardless of the verb, if an operand is an interface value,
+the internal concrete value is used, not the interface itself.
+Thus:
 
-	Format errors:
+	var i interface{} = 23
+	fmt.Printf("%v\n", i)
 
-	If an invalid argument is given for a verb, such as providing
-	a string to %d, the generated string will contain a
-	description of the problem, as in these examples:
+will print 23.
 
-		Wrong type or unknown verb: %!verb(type=value)
-			Printf("%d", hi):          %!d(string=hi)
-		Too many arguments: %!(EXTRA type=value)
-			Printf("hi", "guys"):      hi%!(EXTRA string=guys)
-		Too few arguments: %!verb(MISSING)
-			Printf("hi%d"):            hi%!d(MISSING)
-		Non-int for width or precision: %!(BADWIDTH) or %!(BADPREC)
-			Printf("%*s", 4.5, "hi"):  %!(BADWIDTH)hi
-			Printf("%.*s", 4.5, "hi"): %!(BADPREC)hi
-		Invalid or invalid use of argument index: %!(BADINDEX)
-			Printf("%*[2]d", 7):       %!d(BADINDEX)
-			Printf("%.[2]d", 7):       %!d(BADINDEX)
+Except when printed using the verbs %T and %p, special
+formatting considerations apply for operands that implement
+certain interfaces. In order of application:
 
-	All errors begin with the string "%!" followed sometimes
-	by a single character (the verb) and end with a parenthesized
-	description.
+1. If the operand is a reflect.Value, the operand is replaced by the
+concrete value that it holds, and printing continues with the next rule.
 
-	If an Error or String method triggers a panic when called by a
-	print routine, the fmt package reformats the error message
-	from the panic, decorating it with an indication that it came
-	through the fmt package.  For example, if a String method
-	calls panic("bad"), the resulting formatted message will look
-	like
-		%!s(PANIC=bad)
+2. If an operand implements the Formatter interface, and not
+errors.Formatter, it will be invoked. Formatter provides fine
+control of formatting.
 
-	The %!s just shows the print verb in use when the failure
-	occurred. If the panic is caused by a nil receiver to an Error
-	or String method, however, the output is the undecorated
-	string, "<nil>".
+3. If the %v verb is used with the # flag (%#v) and the operand
+implements the GoStringer interface, that will be invoked.
 
-	Scanning
+If the format (which is implicitly %v for Println etc.) is valid
+for a string (%s %q %v %x %X), the following three rules apply:
 
-	An analogous set of functions scans formatted text to yield
-	values.  Scan, Scanf and Scanln read from os.Stdin; Fscan,
-	Fscanf and Fscanln read from a specified io.Reader; Sscan,
-	Sscanf and Sscanln read from an argument string.
+4. If an operand implements errors.Formatter, the FormatError
+method will be invoked with an errors.Printer to print the error.
+If the %v flag is used with the + flag (%+v), the Detail method
+of the Printer will return true and the error will be formatted
+as a detailed error message. Otherwise the printed string will
+be formatted as required by the verb (if any).
 
-	Scan, Fscan, Sscan treat newlines in the input as spaces.
+5. If an operand implements the error interface, the Error method
+will be invoked to convert the object to a string, which will then
+be formatted as required by the verb (if any).
 
-	Scanln, Fscanln and Sscanln stop scanning at a newline and
-	require that the items be followed by a newline or EOF.
+6. If an operand implements method String() string, that method
+will be invoked to convert the object to a string, which will then
+be formatted as required by the verb (if any).
 
-	Scanf, Fscanf, and Sscanf parse the arguments according to a
-	format string, analogous to that of Printf. In the text that
-	follows, 'space' means any Unicode whitespace character
-	except newline.
+For compound operands such as slices and structs, the format
+applies to the elements of each operand, recursively, not to the
+operand as a whole. Thus %q will quote each element of a slice
+of strings, and %6.2f will control formatting for each element
+of a floating-point array.
 
-	In the format string, a verb introduced by the % character
-	consumes and parses input; these verbs are described in more
-	detail below. A character other than %, space, or newline in
-	the format consumes exactly that input character, which must
-	be present. A newline with zero or more spaces before it in
-	the format string consumes zero or more spaces in the input
-	followed by a single newline or the end of the input. A space
-	following a newline in the format string consumes zero or more
-	spaces in the input. Otherwise, any run of one or more spaces
-	in the format string consumes as many spaces as possible in
-	the input. Unless the run of spaces in the format string
-	appears adjacent to a newline, the run must consume at least
-	one space from the input or find the end of the input.
+However, when printing a byte slice with a string-like verb
+(%s %q %x %X), it is treated identically to a string, as a single item.
 
-	The handling of spaces and newlines differs from that of C's
-	scanf family: in C, newlines are treated as any other space,
-	and it is never an error when a run of spaces in the format
-	string finds no spaces to consume in the input.
+To avoid recursion in cases such as
 
-	The verbs behave analogously to those of Printf.
-	For example, %x will scan an integer as a hexadecimal number,
-	and %v will scan the default representation format for the value.
-	The Printf verbs %p and %T and the flags # and + are not implemented.
-	The verbs %e %E %f %F %g and %G are all equivalent and scan any
-	floating-point or complex value. For float and complex literals in
-	scientific notation, both the decimal (e) and binary (p) exponent
-	formats are supported (for example: "2.3e+7" and "4.5p-8").
+	type X string
+	func (x X) String() string { return Sprintf("<%s>", x) }
 
-	Input processed by verbs is implicitly space-delimited: the
-	implementation of every verb except %c starts by discarding
-	leading spaces from the remaining input, and the %s verb
-	(and %v reading into a string) stops consuming input at the first
-	space or newline character.
+convert the value before recurring:
 
-	The familiar base-setting prefixes 0 (octal) and 0x
-	(hexadecimal) are accepted when scanning integers without
-	a format or with the %v verb.
+	func (x X) String() string { return Sprintf("<%s>", string(x)) }
 
-	Width is interpreted in the input text but there is no
-	syntax for scanning with a precision (no %5.2f, just %5f).
-	If width is provided, it applies after leading spaces are
-	trimmed and specifies the maximum number of runes to read
-	to satisfy the verb. For example,
-	   Sscanf(" 1234567 ", "%5s%d", &s, &i)
-	will set s to "12345" and i to 67 while
-	   Sscanf(" 12 34 567 ", "%5s%d", &s, &i)
-	will set s to "12" and i to 34.
+Infinite recursion can also be triggered by self-referential data
+structures, such as a slice that contains itself as an element, if
+that type has a String method. Such pathologies are rare, however,
+and the package does not protect against them.
 
-	In all the scanning functions, a carriage return followed
-	immediately by a newline is treated as a plain newline
-	(\r\n means the same as \n).
+When printing a struct, fmt cannot and therefore does not invoke
+formatting methods such as Error or String on unexported fields.
 
-	In all the scanning functions, if an operand implements method
-	Scan (that is, it implements the Scanner interface) that
-	method will be used to scan the text for that operand.  Also,
-	if the number of arguments scanned is less than the number of
-	arguments provided, an error is returned.
+Explicit argument indexes:
 
-	All arguments to be scanned must be either pointers to basic
-	types or implementations of the Scanner interface.
+In Printf, Sprintf, and Fprintf, the default behavior is for each
+formatting verb to format successive arguments passed in the call.
+However, the notation [n] immediately before the verb indicates that the
+nth one-indexed argument is to be formatted instead. The same notation
+before a '*' for a width or precision selects the argument index holding
+the value. After processing a bracketed expression [n], subsequent verbs
+will use arguments n+1, n+2, etc. unless otherwise directed.
 
-	Like Scanf and Fscanf, Sscanf need not consume its entire input.
-	There is no way to recover how much of the input string Sscanf used.
+For example,
 
-	Note: Fscan etc. can read one character (rune) past the input
-	they return, which means that a loop calling a scan routine
-	may skip some of the input.  This is usually a problem only
-	when there is no space between input values.  If the reader
-	provided to Fscan implements ReadRune, that method will be used
-	to read characters.  If the reader also implements UnreadRune,
-	that method will be used to save the character and successive
-	calls will not lose data.  To attach ReadRune and UnreadRune
-	methods to a reader without that capability, use
-	bufio.NewReader.
+	fmt.Sprintf("%[2]d %[1]d\n", 11, 22)
+
+will yield "22 11", while
+
+	fmt.Sprintf("%[3]*.[2]*[1]f", 12.0, 2, 6)
+
+equivalent to
+
+	fmt.Sprintf("%6.2f", 12.0)
+
+will yield " 12.00". Because an explicit index affects subsequent verbs,
+this notation can be used to print the same values multiple times
+by resetting the index for the first argument to be repeated:
+
+	fmt.Sprintf("%d %d %#[1]x %#x", 16, 17)
+
+will yield "16 17 0x10 0x11".
+
+Format errors:
+
+If an invalid argument is given for a verb, such as providing
+a string to %d, the generated string will contain a
+description of the problem, as in these examples:
+
+	Wrong type or unknown verb: %!verb(type=value)
+		Printf("%d", hi):          %!d(string=hi)
+	Too many arguments: %!(EXTRA type=value)
+		Printf("hi", "guys"):      hi%!(EXTRA string=guys)
+	Too few arguments: %!verb(MISSING)
+		Printf("hi%d"):            hi%!d(MISSING)
+	Non-int for width or precision: %!(BADWIDTH) or %!(BADPREC)
+		Printf("%*s", 4.5, "hi"):  %!(BADWIDTH)hi
+		Printf("%.*s", 4.5, "hi"): %!(BADPREC)hi
+	Invalid or invalid use of argument index: %!(BADINDEX)
+		Printf("%*[2]d", 7):       %!d(BADINDEX)
+		Printf("%.[2]d", 7):       %!d(BADINDEX)
+
+All errors begin with the string "%!" followed sometimes
+by a single character (the verb) and end with a parenthesized
+description.
+
+If an Error or String method triggers a panic when called by a
+print routine, the fmt package reformats the error message
+from the panic, decorating it with an indication that it came
+through the fmt package.  For example, if a String method
+calls panic("bad"), the resulting formatted message will look
+like
+
+	%!s(PANIC=bad)
+
+The %!s just shows the print verb in use when the failure
+occurred. If the panic is caused by a nil receiver to an Error
+or String method, however, the output is the undecorated
+string, "<nil>".
+
+# Scanning
+
+An analogous set of functions scans formatted text to yield
+values.  Scan, Scanf and Scanln read from os.Stdin; Fscan,
+Fscanf and Fscanln read from a specified io.Reader; Sscan,
+Sscanf and Sscanln read from an argument string.
+
+Scan, Fscan, Sscan treat newlines in the input as spaces.
+
+Scanln, Fscanln and Sscanln stop scanning at a newline and
+require that the items be followed by a newline or EOF.
+
+Scanf, Fscanf, and Sscanf parse the arguments according to a
+format string, analogous to that of Printf. In the text that
+follows, 'space' means any Unicode whitespace character
+except newline.
+
+In the format string, a verb introduced by the % character
+consumes and parses input; these verbs are described in more
+detail below. A character other than %, space, or newline in
+the format consumes exactly that input character, which must
+be present. A newline with zero or more spaces before it in
+the format string consumes zero or more spaces in the input
+followed by a single newline or the end of the input. A space
+following a newline in the format string consumes zero or more
+spaces in the input. Otherwise, any run of one or more spaces
+in the format string consumes as many spaces as possible in
+the input. Unless the run of spaces in the format string
+appears adjacent to a newline, the run must consume at least
+one space from the input or find the end of the input.
+
+The handling of spaces and newlines differs from that of C's
+scanf family: in C, newlines are treated as any other space,
+and it is never an error when a run of spaces in the format
+string finds no spaces to consume in the input.
+
+The verbs behave analogously to those of Printf.
+For example, %x will scan an integer as a hexadecimal number,
+and %v will scan the default representation format for the value.
+The Printf verbs %p and %T and the flags # and + are not implemented.
+The verbs %e %E %f %F %g and %G are all equivalent and scan any
+floating-point or complex value. For float and complex literals in
+scientific notation, both the decimal (e) and binary (p) exponent
+formats are supported (for example: "2.3e+7" and "4.5p-8").
+
+Input processed by verbs is implicitly space-delimited: the
+implementation of every verb except %c starts by discarding
+leading spaces from the remaining input, and the %s verb
+(and %v reading into a string) stops consuming input at the first
+space or newline character.
+
+The familiar base-setting prefixes 0 (octal) and 0x
+(hexadecimal) are accepted when scanning integers without
+a format or with the %v verb.
+
+Width is interpreted in the input text but there is no
+syntax for scanning with a precision (no %5.2f, just %5f).
+If width is provided, it applies after leading spaces are
+trimmed and specifies the maximum number of runes to read
+to satisfy the verb. For example,
+
+	Sscanf(" 1234567 ", "%5s%d", &s, &i)
+
+will set s to "12345" and i to 67 while
+
+	Sscanf(" 12 34 567 ", "%5s%d", &s, &i)
+
+will set s to "12" and i to 34.
+
+In all the scanning functions, a carriage return followed
+immediately by a newline is treated as a plain newline
+(\r\n means the same as \n).
+
+In all the scanning functions, if an operand implements method
+Scan (that is, it implements the Scanner interface) that
+method will be used to scan the text for that operand.  Also,
+if the number of arguments scanned is less than the number of
+arguments provided, an error is returned.
+
+All arguments to be scanned must be either pointers to basic
+types or implementations of the Scanner interface.
+
+Like Scanf and Fscanf, Sscanf need not consume its entire input.
+There is no way to recover how much of the input string Sscanf used.
+
+Note: Fscan etc. can read one character (rune) past the input
+they return, which means that a loop calling a scan routine
+may skip some of the input.  This is usually a problem only
+when there is no space between input values.  If the reader
+provided to Fscan implements ReadRune, that method will be used
+to read characters.  If the reader also implements UnreadRune,
+that method will be used to save the character and successive
+calls will not lose data.  To attach ReadRune and UnreadRune
+methods to a reader without that capability, use
+bufio.NewReader.
 */
 package fmt
diff --git a/errors/fmt/print.go b/errors/fmt/print.go
index 0ba69b3..4a7fa52 100644
--- a/errors/fmt/print.go
+++ b/errors/fmt/print.go
@@ -48,7 +48,7 @@
 type Formatter = gofmt.Formatter
 
 // Stringer is implemented by any value that has a String method,
-// which defines the ``native'' format for that value.
+// which defines the “native” format for that value.
 // The String method is used to print values passed as an operand
 // to any format that accepts a string or to an unformatted printer
 // such as Print.
diff --git a/event/adapter/gokit/gokit_test.go b/event/adapter/gokit/gokit_test.go
index 5db17dd..e12bdbf 100644
--- a/event/adapter/gokit/gokit_test.go
+++ b/event/adapter/gokit/gokit_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 !disable_events
 // +build !disable_events
 
 package gokit_test
diff --git a/event/adapter/logfmt/logfmt.go b/event/adapter/logfmt/logfmt.go
index d635a48..5789e7a 100644
--- a/event/adapter/logfmt/logfmt.go
+++ b/event/adapter/logfmt/logfmt.go
@@ -16,7 +16,7 @@
 	"golang.org/x/exp/event"
 )
 
-//TODO: some actual research into what this arbritray optimization number should be
+// TODO: some actual research into what this arbritray optimization number should be
 const bufCap = 50
 
 const TimeFormat = "2006/01/02 15:04:05"
diff --git a/event/adapter/logr/logr_test.go b/event/adapter/logr/logr_test.go
index 8dcb87b..f8d62f6 100644
--- a/event/adapter/logr/logr_test.go
+++ b/event/adapter/logr/logr_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 !disable_events
 // +build !disable_events
 
 package logr_test
diff --git a/event/adapter/logrus/logrus.go b/event/adapter/logrus/logrus.go
index beef9d4..7924882 100644
--- a/event/adapter/logrus/logrus.go
+++ b/event/adapter/logrus/logrus.go
@@ -2,15 +2,19 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !disable_events
 // +build !disable_events
 
 // Package logrus provides a logrus Formatter for events.
 // To use for the global logger:
-//   logrus.SetFormatter(elogrus.NewFormatter(exporter))
-//   logrus.SetOutput(io.Discard)
+//
+//	logrus.SetFormatter(elogrus.NewFormatter(exporter))
+//	logrus.SetOutput(io.Discard)
+//
 // and for a Logger instance:
-//   logger.SetFormatter(elogrus.NewFormatter(exporter))
-//   logger.SetOutput(io.Discard)
+//
+//	logger.SetFormatter(elogrus.NewFormatter(exporter))
+//	logger.SetOutput(io.Discard)
 //
 // If you call elogging.SetExporter, then you can pass nil
 // for the exporter above and it will use the global one.
diff --git a/event/adapter/logrus/logrus_test.go b/event/adapter/logrus/logrus_test.go
index bf8b850..6e76f3a 100644
--- a/event/adapter/logrus/logrus_test.go
+++ b/event/adapter/logrus/logrus_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 !disable_events
 // +build !disable_events
 
 package logrus_test
diff --git a/event/adapter/zap/zap.go b/event/adapter/zap/zap.go
index df46bcc..c59d9a7 100644
--- a/event/adapter/zap/zap.go
+++ b/event/adapter/zap/zap.go
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !disable_events
 // +build !disable_events
 
 // zap provides an implementation of zapcore.Core for events.
 // To use globally:
-//     zap.ReplaceGlobals(zap.New(NewCore(exporter)))
+//
+//	zap.ReplaceGlobals(zap.New(NewCore(exporter)))
 //
 // If you call elogging.SetExporter, then you can pass nil
 // for the exporter above and it will use the global one.
diff --git a/event/adapter/zap/zap_test.go b/event/adapter/zap/zap_test.go
index 95f6849..787b6b4 100644
--- a/event/adapter/zap/zap_test.go
+++ b/event/adapter/zap/zap_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 !disable_events
 // +build !disable_events
 
 package zap_test
diff --git a/event/alloc_test.go b/event/alloc_test.go
index 4e55395..5144645 100644
--- a/event/alloc_test.go
+++ b/event/alloc_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 event_test
diff --git a/event/disabled.go b/event/disabled.go
index 20019ca..385a6c6 100644
--- a/event/disabled.go
+++ b/event/disabled.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 disable_events
 // +build disable_events
 
 package event
diff --git a/event/export.go b/event/export.go
index 0189599..b50f576 100644
--- a/event/export.go
+++ b/event/export.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 !disable_events
 // +build !disable_events
 
 package event
diff --git a/event/severity/severity_test.go b/event/severity/severity_test.go
index 8825f23..5f31832 100644
--- a/event/severity/severity_test.go
+++ b/event/severity/severity_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 !disable_events
 // +build !disable_events
 
 package severity_test
diff --git a/event/source.go b/event/source.go
index e9eaad3..05d9aa9 100644
--- a/event/source.go
+++ b/event/source.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 !disable_events
 // +build !disable_events
 
 package event
@@ -40,7 +41,9 @@
 // be used when capturing the source information on events.
 // v should be either a string or a function pointer.
 // If v is a string it is of the form
-//   Space.Owner.Name
+//
+//	Space.Owner.Name
+//
 // where Owner and Name cannot contain '/' and Name also cannot contain '.'
 func RegisterHelper(v interface{}) {
 	g := <-globalCallers
diff --git a/io/i2c/i2c.go b/io/i2c/i2c.go
index 6507254..192ad3d 100644
--- a/io/i2c/i2c.go
+++ b/io/i2c/i2c.go
@@ -4,7 +4,7 @@
 
 // Package i2c allows users to read from and write to a slave I2C device.
 //
-// Deprecated
+// # Deprecated
 //
 // This package is not maintained anymore. An actively supported cross-platform
 // alternative is https://periph.io/.
diff --git a/io/spi/spi.go b/io/spi/spi.go
index 175e20d..a675bd1 100644
--- a/io/spi/spi.go
+++ b/io/spi/spi.go
@@ -4,7 +4,7 @@
 
 // Package spi allows users to read from and write to an SPI device.
 //
-// Deprecated
+// # Deprecated
 //
 // This package is not maintained anymore. An actively supported cross-platform
 // alternative is https://periph.io/.
diff --git a/jsonrpc2/internal/stack/process.go b/jsonrpc2/internal/stack/process.go
index ac19366..8812de9 100644
--- a/jsonrpc2/internal/stack/process.go
+++ b/jsonrpc2/internal/stack/process.go
@@ -96,7 +96,7 @@
 	s.Calls[index].merge(gr)
 }
 
-//TODO: do we want other grouping strategies?
+// TODO: do we want other grouping strategies?
 func (c *Call) merge(gr Goroutine) {
 	for i := range c.Groups {
 		canditate := &c.Groups[i]
diff --git a/jsonrpc2/internal/stack/stacktest/stacktest.go b/jsonrpc2/internal/stack/stacktest/stacktest.go
index 560824c..bde66a5 100644
--- a/jsonrpc2/internal/stack/stacktest/stacktest.go
+++ b/jsonrpc2/internal/stack/stacktest/stacktest.go
@@ -11,7 +11,7 @@
 	"golang.org/x/exp/jsonrpc2/internal/stack"
 )
 
-//this is only needed to support pre 1.14 when testing.TB did not have Cleanup
+// this is only needed to support pre 1.14 when testing.TB did not have Cleanup
 type withCleanup interface {
 	Cleanup(func())
 }
diff --git a/rand/exp.go b/rand/exp.go
index 4bc110f..0838672 100644
--- a/rand/exp.go
+++ b/rand/exp.go
@@ -26,8 +26,7 @@
 // To produce a distribution with a different rate parameter,
 // callers can adjust the output using:
 //
-//  sample = ExpFloat64() / desiredRateParameter
-//
+//	sample = ExpFloat64() / desiredRateParameter
 func (r *Rand) ExpFloat64() float64 {
 	for {
 		j := r.Uint32()
diff --git a/rand/normal.go b/rand/normal.go
index ba4ea54..b66da3a 100644
--- a/rand/normal.go
+++ b/rand/normal.go
@@ -33,8 +33,7 @@
 // To produce a different normal distribution, callers can
 // adjust the output using:
 //
-//  sample = NormFloat64() * desiredStdDev + desiredMean
-//
+//	sample = NormFloat64() * desiredStdDev + desiredMean
 func (r *Rand) NormFloat64() float64 {
 	for {
 		j := int32(r.Uint32()) // Possibly negative
diff --git a/rand/rand.go b/rand/rand.go
index 173c0f5..ee6161b 100644
--- a/rand/rand.go
+++ b/rand/rand.go
@@ -321,8 +321,7 @@
 // To produce a different normal distribution, callers can
 // adjust the output using:
 //
-//  sample = NormFloat64() * desiredStdDev + desiredMean
-//
+//	sample = NormFloat64() * desiredStdDev + desiredMean
 func NormFloat64() float64 { return globalRand.NormFloat64() }
 
 // ExpFloat64 returns an exponentially distributed float64 in the range
@@ -331,8 +330,7 @@
 // To produce a distribution with a different rate parameter,
 // callers can adjust the output using:
 //
-//  sample = ExpFloat64() / desiredRateParameter
-//
+//	sample = ExpFloat64() / desiredRateParameter
 func ExpFloat64() float64 { return globalRand.ExpFloat64() }
 
 // LockedSource is an implementation of Source that is concurrency-safe.
diff --git a/rand/rng.go b/rand/rng.go
index 17cee10..9b79108 100644
--- a/rand/rng.go
+++ b/rand/rng.go
@@ -13,10 +13,10 @@
 // PCGSource is an implementation of a 64-bit permuted congruential
 // generator as defined in
 //
-// 	PCG: A Family of Simple Fast Space-Efficient Statistically Good
-// 	Algorithms for Random Number Generation
-// 	Melissa E. O’Neill, Harvey Mudd College
-// 	http://www.pcg-random.org/pdf/toms-oneill-pcg-family-v1.02.pdf
+//	PCG: A Family of Simple Fast Space-Efficient Statistically Good
+//	Algorithms for Random Number Generation
+//	Melissa E. O’Neill, Harvey Mudd College
+//	http://www.pcg-random.org/pdf/toms-oneill-pcg-family-v1.02.pdf
 //
 // The generator here is the congruential generator PCG XSL RR 128/64 (LCG)
 // as found in the software available at http://www.pcg-random.org/.
diff --git a/shiny/driver/gldriver/cocoa.go b/shiny/driver/gldriver/cocoa.go
index 84bb393..db5ba63 100644
--- a/shiny/driver/gldriver/cocoa.go
+++ b/shiny/driver/gldriver/cocoa.go
@@ -411,6 +411,7 @@
 // into the standard keycodes used by the key package.
 //
 // To get a sense of the key map, see the diagram on
+//
 //	http://boredzo.org/blog/archives/2007-05-22/virtual-key-codes
 func cocoaKeyCode(vkcode uint16) key.Code {
 	switch vkcode {
diff --git a/shiny/example/basic/main.go b/shiny/example/basic/main.go
index 739faf6..8a35268 100644
--- a/shiny/example/basic/main.go
+++ b/shiny/example/basic/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/basicgl/main.go b/shiny/example/basicgl/main.go
index 6bd428f..b097180 100644
--- a/shiny/example/basicgl/main.go
+++ b/shiny/example/basicgl/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/fluid/main.go b/shiny/example/fluid/main.go
index 980f588..e410b42 100644
--- a/shiny/example/fluid/main.go
+++ b/shiny/example/fluid/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/goban/asset/resize.go b/shiny/example/goban/asset/resize.go
index 38e61fd..7d91152 100644
--- a/shiny/example/goban/asset/resize.go
+++ b/shiny/example/goban/asset/resize.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
 
 // Custom image resizer. Saved for posterity.
diff --git a/shiny/example/goban/board.go b/shiny/example/goban/board.go
index f95e793..f176a90 100644
--- a/shiny/example/goban/board.go
+++ b/shiny/example/goban/board.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go board.go xy.go" to run it
diff --git a/shiny/example/goban/main.go b/shiny/example/goban/main.go
index dd02fae..f692b5c 100644
--- a/shiny/example/goban/main.go
+++ b/shiny/example/goban/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go board.go xy.go" to run it
diff --git a/shiny/example/goban/xy.go b/shiny/example/goban/xy.go
index cdacde6..7519e9c 100644
--- a/shiny/example/goban/xy.go
+++ b/shiny/example/goban/xy.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go board.go xy.go" to run it
diff --git a/shiny/example/goban/xy_test.go b/shiny/example/goban/xy_test.go
index 3d2e977..fa8e608 100644
--- a/shiny/example/goban/xy_test.go
+++ b/shiny/example/goban/xy_test.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 example
 // +build example
+
 //
 // Use "go test -tags=example" to run this test.
 
diff --git a/shiny/example/icongallery/main.go b/shiny/example/icongallery/main.go
index efb8f12..5f7c9ad 100644
--- a/shiny/example/icongallery/main.go
+++ b/shiny/example/icongallery/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/imageview/main.go b/shiny/example/imageview/main.go
index 49ec839..0aa91fa 100644
--- a/shiny/example/imageview/main.go
+++ b/shiny/example/imageview/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/layout/main.go b/shiny/example/layout/main.go
index b5cac9d..a6f4532 100644
--- a/shiny/example/layout/main.go
+++ b/shiny/example/layout/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/textedit/main.go b/shiny/example/textedit/main.go
index e72358e..70ac599 100644
--- a/shiny/example/textedit/main.go
+++ b/shiny/example/textedit/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/tile/main.go b/shiny/example/tile/main.go
index dfb4526..c99e247 100644
--- a/shiny/example/tile/main.go
+++ b/shiny/example/tile/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/example/widgetgallery/main.go b/shiny/example/widgetgallery/main.go
index ed926a8..bbff7b6 100644
--- a/shiny/example/widgetgallery/main.go
+++ b/shiny/example/widgetgallery/main.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 example
 // +build example
+
 //
 // This build tag means that "go install golang.org/x/exp/shiny/..." doesn't
 // install this example program. Use "go run main.go" to run it or "go install
diff --git a/shiny/iconvg/upgrade.go b/shiny/iconvg/upgrade.go
index 6057391..5cfdef0 100644
--- a/shiny/iconvg/upgrade.go
+++ b/shiny/iconvg/upgrade.go
@@ -673,12 +673,13 @@
 // E) form a parallelogram:
 //
 // E=A           B
-//    o---------o
-//     \         \
-//      \         \
-//       \         \
-//        o---------o
-//       D           C
+//
+//	o---------o
+//	 \         \
+//	  \         \
+//	   \         \
+//	    o---------o
+//	   D           C
 //
 // Specifically, it checks that (A == E) and ((A - B) == (D - C)). That last
 // equation can be rearranged as (A == (B - C + D)).
@@ -700,15 +701,17 @@
 // Let A± denote the two tangent vectors (A+ - A) and (A - A-) and likewise for
 // B±, C± and D±.
 //
-//     A+     B-
+//	A+     B-
+//
 // E=A  o    o   B
 // A- o---------o   B+
-//  o  \         \ o
-//      \    X    \
-//     o \         \  o
-//    D+  o---------o  C-
-//       D   o    o  C
-//          D-     C+
+//
+//	o  \         \ o
+//	    \    X    \
+//	   o \         \  o
+//	  D+  o---------o  C-
+//	     D   o    o  C
+//	        D-     C+
 //
 // See https://nigeltao.github.io/blog/2021/three-points-define-ellipse.html
 // for a better version of that ASCII art.
diff --git a/shiny/materialdesign/icons/gen.go b/shiny/materialdesign/icons/gen.go
index b67a606..473d2a7 100644
--- a/shiny/materialdesign/icons/gen.go
+++ b/shiny/materialdesign/icons/gen.go
@@ -40,7 +40,9 @@
 //
 // When manually debugging one particular icon, it can be useful to add
 // something like:
-// 	if baseName != "check_box" { return errSkip }
+//
+//	if baseName != "check_box" { return errSkip }
+//
 // at the top of func genFile.
 var errSkip = errors.New("skipping SVG to IconVG conversion")
 
diff --git a/shiny/text/caret.go b/shiny/text/caret.go
index 87da5f6..24daa96 100644
--- a/shiny/text/caret.go
+++ b/shiny/text/caret.go
@@ -104,7 +104,9 @@
 // Diagramatically, suppose we have two adjacent boxes (shown by square
 // brackets below), with the Caret (an integer location called Caret.pos in the
 // Frame's text) in the middle of the "foo2bar3" word:
+//
 //	[foo0 foo1 foo2]^[bar3 bar4 bar5]
+//
 // leanForwards moves Caret.k from fooBox.j to barBox.i, also updating the
 // Caret's p, l and b. Caret.pos remains unchanged.
 func (c *Caret) leanForwards() leanResult {
diff --git a/shootout/binary-tree-freelist.go b/shootout/binary-tree-freelist.go
index eab6bb3..e4c3e8a 100644
--- a/shootout/binary-tree-freelist.go
+++ b/shootout/binary-tree-freelist.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/binary-tree.go b/shootout/binary-tree.go
index fe5844f..5f6cb34 100644
--- a/shootout/binary-tree.go
+++ b/shootout/binary-tree.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/chameneosredux.go b/shootout/chameneosredux.go
index 16fa8b9..80bea32 100644
--- a/shootout/chameneosredux.go
+++ b/shootout/chameneosredux.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/fannkuch-parallel.go b/shootout/fannkuch-parallel.go
index 96a4e45..a69b09c 100644
--- a/shootout/fannkuch-parallel.go
+++ b/shootout/fannkuch-parallel.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/fannkuch.go b/shootout/fannkuch.go
index 5ba751f..4f07dff 100644
--- a/shootout/fannkuch.go
+++ b/shootout/fannkuch.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/fasta.go b/shootout/fasta.go
index fa9569a..3890113 100644
--- a/shootout/fasta.go
+++ b/shootout/fasta.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/k-nucleotide-parallel.go b/shootout/k-nucleotide-parallel.go
index 348d285..8b25419 100644
--- a/shootout/k-nucleotide-parallel.go
+++ b/shootout/k-nucleotide-parallel.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/k-nucleotide.go b/shootout/k-nucleotide.go
index 2962a69..efc8d95 100644
--- a/shootout/k-nucleotide.go
+++ b/shootout/k-nucleotide.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/mandelbrot.go b/shootout/mandelbrot.go
index d433554..2b82a2f 100644
--- a/shootout/mandelbrot.go
+++ b/shootout/mandelbrot.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/meteor-contest.go b/shootout/meteor-contest.go
index ea5d44b..cfe49ec 100644
--- a/shootout/meteor-contest.go
+++ b/shootout/meteor-contest.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/nbody.go b/shootout/nbody.go
index 1034221..4eeba44 100644
--- a/shootout/nbody.go
+++ b/shootout/nbody.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/pidigits.go b/shootout/pidigits.go
index a5cced3..16f8f81 100644
--- a/shootout/pidigits.go
+++ b/shootout/pidigits.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/regex-dna-parallel.go b/shootout/regex-dna-parallel.go
index a3be491..68ccd76 100644
--- a/shootout/regex-dna-parallel.go
+++ b/shootout/regex-dna-parallel.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/regex-dna.go b/shootout/regex-dna.go
index 24600a0..85e1939 100644
--- a/shootout/regex-dna.go
+++ b/shootout/regex-dna.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/reverse-complement.go b/shootout/reverse-complement.go
index 9d4b6bf..11b59d2 100644
--- a/shootout/reverse-complement.go
+++ b/shootout/reverse-complement.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/spectral-norm-parallel.go b/shootout/spectral-norm-parallel.go
index 5c976ff..5ad4e20 100644
--- a/shootout/spectral-norm-parallel.go
+++ b/shootout/spectral-norm-parallel.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/spectral-norm.go b/shootout/spectral-norm.go
index 5ca33dc..fb41051 100644
--- a/shootout/spectral-norm.go
+++ b/shootout/spectral-norm.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/shootout/threadring.go b/shootout/threadring.go
index 316bf61..035867f 100644
--- a/shootout/threadring.go
+++ b/shootout/threadring.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 /*
diff --git a/sumdb/gosumcheck/main.go b/sumdb/gosumcheck/main.go
index bb3bb4f..cd7aef2 100644
--- a/sumdb/gosumcheck/main.go
+++ b/sumdb/gosumcheck/main.go
@@ -28,7 +28,6 @@
 //
 // To discourage misuse in automated settings, gosumcheck does not
 // set any exit status to report whether any problems were found.
-//
 package main
 
 import (
diff --git a/sumdb/internal/note/note.go b/sumdb/internal/note/note.go
index 4b25773..5fe2481 100644
--- a/sumdb/internal/note/note.go
+++ b/sumdb/internal/note/note.go
@@ -23,7 +23,7 @@
 // the concatenation of the server name, a newline, and
 // the encoded public key.
 //
-// Verifying Notes
+// # Verifying Notes
 //
 // A Verifier allows verification of signatures by one server public key.
 // It can report the name of the server and the uint32 hash of the key,
@@ -50,7 +50,7 @@
 // the message signatures and returns a Note structure
 // containing the message text and (verified or unverified) signatures.
 //
-// Signing Notes
+// # Signing Notes
 //
 // A Signer allows signing a text with a given key.
 // It can report the name of the server and the hash of the key
@@ -66,7 +66,7 @@
 // The Sign function takes as input a Note and a list of Signers
 // and returns an encoded, signed message.
 //
-// Signed Note Format
+// # Signed Note Format
 //
 // A signed note consists of a text ending in newline (U+000A),
 // followed by a blank line (only a newline),
@@ -88,7 +88,7 @@
 // to sign the note text (including the final newline but not the
 // separating blank line).
 //
-// Generating Keys
+// # Generating Keys
 //
 // There is only one key type, Ed25519 with algorithm identifier 1.
 // New key types may be introduced in the future as needed,
@@ -98,7 +98,7 @@
 // The GenerateKey function generates and returns a new signer
 // and corresponding verifier.
 //
-// Example
+// # Example
 //
 // Here is a well-formed signed note:
 //
@@ -178,7 +178,6 @@
 //
 //	— PeterNeumann x08go/ZJkuBS9UG/SffcvIAQxVBtiFupLLr8pAcElZInNIuGUgYN1FFYC2pZSNXgKvqfqdngotpRZb6KE6RyyBwJnAM=
 //	— EnochRoot rwz+eBzmZa0SO3NbfRGzPCpDckykFXSdeX+MNtCOXm2/5n2tiOHp+vAF1aGrQ5ovTG01oOTGwnWLox33WWd1RvMc+QQ=
-//
 package note
 
 import (
diff --git a/sumdb/internal/sumweb/server.go b/sumdb/internal/sumweb/server.go
index 522d332..d25f5a3 100644
--- a/sumdb/internal/sumweb/server.go
+++ b/sumdb/internal/sumweb/server.go
@@ -52,7 +52,6 @@
 //	for _, path := range sumweb.Paths {
 //		http.HandleFunc(path, handler)
 //	}
-//
 var Paths = []string{
 	"/lookup/",
 	"/latest",
diff --git a/sumdb/internal/tlog/tlog.go b/sumdb/internal/tlog/tlog.go
index 3dd75da..732316f 100644
--- a/sumdb/internal/tlog/tlog.go
+++ b/sumdb/internal/tlog/tlog.go
@@ -11,7 +11,6 @@
 // This package follows the design of Certificate Transparency (RFC 6962)
 // and its proofs are compatible with that system.
 // See TestCertificateTransparency.
-//
 package tlog
 
 import (
diff --git a/typeparams/common.go b/typeparams/common.go
index 0193388..7f867cf 100644
--- a/typeparams/common.go
+++ b/typeparams/common.go
@@ -123,15 +123,15 @@
 //
 // For example, consider the following type declarations:
 //
-//  type Interface[T any] interface {
-//  	Accept(T)
-//  }
+//	type Interface[T any] interface {
+//		Accept(T)
+//	}
 //
-//  type Container[T any] struct {
-//  	Element T
-//  }
+//	type Container[T any] struct {
+//		Element T
+//	}
 //
-//  func (c Container[T]) Accept(t T) { c.Element = t }
+//	func (c Container[T]) Accept(t T) { c.Element = t }
 //
 // In this case, GenericAssignableTo reports that instantiations of Container
 // are assignable to the corresponding instantiation of Interface.
diff --git a/typeparams/example/findtypeparams/main.go b/typeparams/example/findtypeparams/main.go
index fad6f0a..50a1fcc 100644
--- a/typeparams/example/findtypeparams/main.go
+++ b/typeparams/example/findtypeparams/main.go
@@ -36,7 +36,7 @@
 //!-input
 `
 
-//!+print
+// !+print
 func PrintTypeParams(fset *token.FileSet, file *ast.File) error {
 	conf := types.Config{Importer: importer.Default()}
 	info := &types.Info{
diff --git a/typeparams/example/genericmethods/main.go b/typeparams/example/genericmethods/main.go
index 7673691..8acdcf2 100644
--- a/typeparams/example/genericmethods/main.go
+++ b/typeparams/example/genericmethods/main.go
@@ -39,7 +39,7 @@
 //!-input
 `
 
-//!+printmethods
+// !+printmethods
 func PrintMethods(pkg *types.Package) {
 	// Look up *Named types in the package scope.
 	lookup := func(name string) *types.Named {
@@ -84,7 +84,7 @@
 //!-printoutput
 */
 
-//!+compareorigins
+// !+compareorigins
 func CompareOrigins(pkg *types.Package) {
 	Pair := pkg.Scope().Lookup("Pair").Type().(*types.Named)
 	IntPair := pkg.Scope().Lookup("IntPair").Type().(*types.Named)
diff --git a/typeparams/example/implicit/main.go b/typeparams/example/implicit/main.go
index 8894de5..996ad2c 100644
--- a/typeparams/example/implicit/main.go
+++ b/typeparams/example/implicit/main.go
@@ -19,7 +19,7 @@
 //!-input
 `
 
-//!+show
+// !+show
 func ShowImplicit(pkg *types.Package) {
 	Square := pkg.Scope().Lookup("Square").Type().(*types.Signature)
 	N := Square.TypeParams().At(0)
diff --git a/typeparams/example/instantiation/main.go b/typeparams/example/instantiation/main.go
index 66c7be2..11e19c1 100644
--- a/typeparams/example/instantiation/main.go
+++ b/typeparams/example/instantiation/main.go
@@ -42,7 +42,7 @@
 //!-input
 `
 
-//!+check
+// !+check
 func CheckInstances(fset *token.FileSet, file *ast.File) (*types.Package, error) {
 	conf := types.Config{}
 	info := &types.Info{
@@ -82,7 +82,7 @@
 	return buf.String()
 }
 
-//!+instantiate
+// !+instantiate
 func Instantiate(pkg *types.Package) error {
 	Pair := pkg.Scope().Lookup("Pair").Type()
 	X := pkg.Scope().Lookup("X").Type()
diff --git a/typeparams/example/interfaces/main.go b/typeparams/example/interfaces/main.go
index c19a210..9f9ac62 100644
--- a/typeparams/example/interfaces/main.go
+++ b/typeparams/example/interfaces/main.go
@@ -43,7 +43,7 @@
 //!-input
 `
 
-//!+printsyntax
+// !+printsyntax
 func PrintNumericSyntax(fset *token.FileSet, file *ast.File) {
 	// node is the AST node corresponding to the declaration for "Numeric."
 	node := file.Scope.Lookup("Numeric").Decl.(*ast.TypeSpec)
@@ -80,7 +80,7 @@
 //!-outputsyntax
 */
 
-//!+printtypes
+// !+printtypes
 func PrintInterfaceTypes(fset *token.FileSet, file *ast.File) error {
 	conf := types.Config{}
 	pkg, err := conf.Check("hello", fset, []*ast.File{file}, nil)
diff --git a/typeparams/example/methoddecls/main.go b/typeparams/example/methoddecls/main.go
index 00779c1..da19bef 100644
--- a/typeparams/example/methoddecls/main.go
+++ b/typeparams/example/methoddecls/main.go
@@ -50,7 +50,7 @@
 //!-input
 `
 
-//!+describe
+// !+describe
 func Describe(fset *token.FileSet, file *ast.File) error {
 	conf := types.Config{Importer: importer.Default()}
 	info := &types.Info{
diff --git a/typeparams/example/predicates/main.go b/typeparams/example/predicates/main.go
index c22b4a0..5237c06 100644
--- a/typeparams/example/predicates/main.go
+++ b/typeparams/example/predicates/main.go
@@ -51,7 +51,7 @@
 //!-input
 `
 
-//!+ordinary
+// !+ordinary
 func OrdinaryPredicates(pkg *types.Package) {
 	var (
 		Pair        = pkg.Scope().Lookup("Pair").Type()
@@ -79,7 +79,7 @@
 //!-ordinaryoutput
 */
 
-//!+generic
+// !+generic
 func GenericPredicates(pkg *types.Package) {
 	var (
 		Pair        = pkg.Scope().Lookup("Pair").Type()
diff --git a/typeparams/example/typesets/main.go b/typeparams/example/typesets/main.go
index b26dbc7..05da8be 100644
--- a/typeparams/example/typesets/main.go
+++ b/typeparams/example/typesets/main.go
@@ -29,7 +29,7 @@
 //!-input
 `
 
-//!+print
+// !+print
 func PrintNormalTerms(pkg *types.Package) error {
 	D := pkg.Scope().Lookup("D").Type()
 	terms, err := typeparams.NormalTerms(D)
diff --git a/typeparams/normalize.go b/typeparams/normalize.go
index ffb4e2b..6cf71f0 100644
--- a/typeparams/normalize.go
+++ b/typeparams/normalize.go
@@ -36,13 +36,13 @@
 // restrictions may be arbitrarily complex. For example, consider the
 // following:
 //
-//  type A interface{ ~string|~[]byte }
+//	type A interface{ ~string|~[]byte }
 //
-//  type B interface{ int|string }
+//	type B interface{ int|string }
 //
-//  type C interface { ~string|~int }
+//	type C interface { ~string|~int }
 //
-//  type T[P interface{ A|B; C }] int
+//	type T[P interface{ A|B; C }] int
 //
 // In this example, the structural type restriction of P is ~string|int: A|B
 // expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
diff --git a/typeparams/typeterm.go b/typeparams/typeterm.go
index 7ddee28..7350bb7 100644
--- a/typeparams/typeterm.go
+++ b/typeparams/typeterm.go
@@ -10,11 +10,10 @@
 
 // A term describes elementary type sets:
 //
-//   ∅:  (*term)(nil)     == ∅                      // set of no types (empty set)
-//   š¯“¤:  &term{}          == š¯“¤                      // set of all types (š¯“¤niverse)
-//   T:  &term{false, T}  == {T}                    // set of type T
-//  ~t:  &term{true, t}   == {t' | under(t') == t}  // set of types with underlying type t
-//
+//	 ∅:  (*term)(nil)     == ∅                      // set of no types (empty set)
+//	 š¯“¤:  &term{}          == š¯“¤                      // set of all types (š¯“¤niverse)
+//	 T:  &term{false, T}  == {T}                    // set of type T
+//	~t:  &term{true, t}   == {t' | under(t') == t}  // set of types with underlying type t
 type term struct {
 	tilde bool // valid if typ != nil
 	typ   types.Type
diff --git a/winfsnotify/winfsnotify.go b/winfsnotify/winfsnotify.go
index 6781291..8c7c43f 100644
--- a/winfsnotify/winfsnotify.go
+++ b/winfsnotify/winfsnotify.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 winfsnotify allows the user to receive
diff --git a/winfsnotify/winfsnotify_test.go b/winfsnotify/winfsnotify_test.go
index a0bd432..de4f514 100644
--- a/winfsnotify/winfsnotify_test.go
+++ b/winfsnotify/winfsnotify_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 winfsnotify