From a80070e0cf0b65d619b6669a789d27746a5b2126 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 17 Nov 2021 01:36:15 +0700 Subject: math/big: call norm when returning success from Rat SetString After CL 24430, reflect.DeepEqual no longer returns true when comparing a *Rat built with (*Rat).SetString("0") with one built with (*Rat).SetInt64(0). These should be equivalent, but because (*Rat).SetString does not call norm() when returning the zero value, the result of reflect.DeepEqual will be false. One could suggest that developers should use (*Rat).Cmp instead of relying on reflect.DeepEqual, but if a (*Rat) is part of a larger struct that is being compared, this can be cumbersome. This is fixed by calling z.norm() when returning zero in SetString. Fixes #50944 Change-Id: Ib84ae975bf82fe02d1203aa9668a01960c0fd59d Reviewed-on: https://go-review.googlesource.com/c/go/+/364434 Reviewed-by: Katie Hockman Trust: Katie Hockman Trust: Ian Lance Taylor --- src/math/big/ratconv.go | 2 +- src/math/big/ratconv_test.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/math') diff --git a/src/math/big/ratconv.go b/src/math/big/ratconv.go index 90053a9c81..dadd4d7b8e 100644 --- a/src/math/big/ratconv.go +++ b/src/math/big/ratconv.go @@ -113,7 +113,7 @@ func (z *Rat) SetString(s string) (*Rat, bool) { // special-case 0 (see also issue #16176) if len(z.a.abs) == 0 { - return z, true + return z.norm(), true } // len(z.a.abs) > 0 diff --git a/src/math/big/ratconv_test.go b/src/math/big/ratconv_test.go index e55e655718..45a35608f4 100644 --- a/src/math/big/ratconv_test.go +++ b/src/math/big/ratconv_test.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "math" + "reflect" "strconv" "strings" "testing" @@ -205,6 +206,14 @@ func TestRatSetString(t *testing.T) { } } +func TestRatSetStringZero(t *testing.T) { + got, _ := new(Rat).SetString("0") + want := new(Rat).SetInt64(0) + if !reflect.DeepEqual(got, want) { + t.Errorf("got %#+v, want %#+v", got, want) + } +} + func TestRatScan(t *testing.T) { var buf bytes.Buffer for i, test := range setStringTests { -- cgit v1.3 From 7d87ccc860dc31c0cd60faf00720e2f30fd37efb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 29 Jan 2022 19:07:27 -0500 Subject: all: fix various doc comment formatting nits A run of lines that are indented with any number of spaces or tabs format as a
 block. This commit fixes various doc comments
that format badly according to that (standard) rule.

For example, consider:

	// - List item.
	//   Second line.
	// - Another item.

Because the - lines are unindented, this is actually two paragraphs
separated by a one-line 
 block. This CL rewrites it to:

	//  - List item.
	//    Second line.
	//  - Another item.

Today, that will format as a single 
 block.
In a future release, we hope to format it as a bulleted list.

Various other minor fixes as well, all in preparation for reformatting.

For #51082.

Change-Id: I95cf06040d4186830e571cd50148be3bf8daf189
Reviewed-on: https://go-review.googlesource.com/c/go/+/384257
Trust: Russ Cox 
Run-TryBot: Russ Cox 
Reviewed-by: Ian Lance Taylor 
TryBot-Result: Gopher Robot 
---
 src/cmd/compile/internal/abi/abiutils.go           |  12 +-
 src/cmd/compile/internal/ir/expr.go                |  10 +-
 src/cmd/compile/internal/noder/unified.go          |  28 +--
 src/cmd/compile/internal/reflectdata/reflect.go    |   8 +-
 src/cmd/compile/internal/ssa/block.go              |   9 +-
 src/cmd/compile/internal/ssa/branchelim.go         |  10 +-
 src/cmd/compile/internal/ssa/compile.go            |  12 +-
 src/cmd/compile/internal/ssa/func.go               |  12 +-
 .../compile/internal/ssa/fuse_branchredirect.go    |  24 +-
 src/cmd/compile/internal/ssa/location.go           |  20 +-
 src/cmd/compile/internal/ssa/loopbce.go            |  20 +-
 src/cmd/compile/internal/ssa/phiopt.go             |  12 +-
 src/cmd/compile/internal/ssa/prove.go              |  20 +-
 src/cmd/compile/internal/ssa/sparsetree.go         |   4 +-
 src/cmd/compile/internal/ssa/writebarrier.go       |  10 +-
 src/cmd/compile/internal/syntax/parser.go          |  52 ++--
 src/cmd/compile/internal/typecheck/subr.go         |  14 +-
 src/cmd/compile/internal/types/size.go             |  18 +-
 src/cmd/compile/internal/types/type.go             |   6 +-
 src/cmd/compile/internal/types2/infer.go           |   3 +-
 src/cmd/compile/internal/types2/object.go          |   2 +-
 src/cmd/compile/internal/walk/builtin.go           |  12 +-
 src/cmd/compile/internal/walk/range.go             |  12 +-
 src/cmd/dist/buildgo.go                            |   2 +-
 src/cmd/go/script_test.go                          |   4 +-
 src/cmd/internal/goobj/objfile.go                  |  58 ++---
 src/cmd/internal/obj/arm64/doc.go                  |  53 ++--
 src/cmd/internal/obj/inl.go                        |  26 +-
 src/cmd/internal/obj/objfile.go                    |  16 +-
 src/cmd/internal/obj/ppc64/doc.go                  | 277 +++++++++++----------
 src/cmd/internal/obj/riscv/cpu.go                  |   8 +-
 src/cmd/internal/obj/riscv/obj.go                  |   4 +-
 src/cmd/link/internal/benchmark/bench.go           |  20 +-
 src/cmd/link/internal/ld/elf.go                    |  49 ++--
 src/cmd/link/internal/ld/outbuf.go                 |  12 +-
 src/cmd/link/internal/loader/loader.go             |  24 +-
 src/cmd/link/internal/s390x/asm.go                 |   8 +-
 src/compress/flate/huffman_code.go                 |  25 +-
 src/crypto/cipher/gcm.go                           |   2 +-
 src/crypto/elliptic/p256.go                        |   3 +-
 src/crypto/x509/x509.go                            |  95 ++++---
 src/database/sql/fakedb_test.go                    |   2 +-
 src/debug/gosym/pclntab_test.go                    |  11 +-
 src/fmt/doc.go                                     |   9 +-
 src/go/doc/comment.go                              |  13 +-
 src/go/types/object.go                             |   2 +-
 src/math/big/nat.go                                |   7 +-
 src/net/cgo_unix.go                                |  12 +-
 src/net/http/client.go                             |   6 +-
 src/net/http/cookie.go                             |  10 +-
 src/net/http/server.go                             |  16 +-
 src/net/smtp/smtp_test.go                          |   5 +-
 src/os/file_windows.go                             |   2 +-
 src/runtime/chan.go                                |   8 +-
 src/runtime/mheap.go                               |  18 +-
 src/runtime/netpoll.go                             |  20 +-
 src/runtime/proc.go                                |  10 +-
 src/runtime/runtime2.go                            |   6 +-
 src/runtime/string.go                              |   8 +-
 src/runtime/symtab_test.go                         |  16 +-
 src/runtime/type.go                                |   2 +-
 src/syscall/exec_windows.go                        |  10 +-
 src/time/zoneinfo.go                               |  16 +-
 63 files changed, 619 insertions(+), 606 deletions(-)

(limited to 'src/math')

diff --git a/src/cmd/compile/internal/abi/abiutils.go b/src/cmd/compile/internal/abi/abiutils.go
index 529150a390..07ece87c41 100644
--- a/src/cmd/compile/internal/abi/abiutils.go
+++ b/src/cmd/compile/internal/abi/abiutils.go
@@ -788,12 +788,12 @@ func (state *assignState) assignParamOrReturn(pt *types.Type, n types.Object, is
 // field. For things that are not structs (or structs without padding)
 // it returns a list of zeros. Example:
 //
-// type small struct {
-//   x uint16
-//   y uint8
-//   z int32
-//   w int32
-// }
+//	type small struct {
+//		x uint16
+//		y uint8
+//		z int32
+//		w int32
+//	}
 //
 // For this struct we would return a list [0, 1, 0, 0], meaning that
 // we have one byte of padding after the second field, and no bytes of
diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go
index 82132005f9..b5c0983d6a 100644
--- a/src/cmd/compile/internal/ir/expr.go
+++ b/src/cmd/compile/internal/ir/expr.go
@@ -951,11 +951,11 @@ var IsIntrinsicCall = func(*CallExpr) bool { return false }
 // instead of computing both. SameSafeExpr assumes that l and r are
 // used in the same statement or expression. In order for it to be
 // safe to reuse l or r, they must:
-// * be the same expression
-// * not have side-effects (no function calls, no channel ops);
-//   however, panics are ok
-// * not cause inappropriate aliasing; e.g. two string to []byte
-//   conversions, must result in two distinct slices
+//  * be the same expression
+//  * not have side-effects (no function calls, no channel ops);
+//    however, panics are ok
+//  * not cause inappropriate aliasing; e.g. two string to []byte
+//    conversions, must result in two distinct slices
 //
 // The handling of OINDEXMAP is subtle. OINDEXMAP can occur both
 // as an lvalue (map assignment) and an rvalue (map access). This is
diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go
index ca01c0da95..f45c4a7ea8 100644
--- a/src/cmd/compile/internal/noder/unified.go
+++ b/src/cmd/compile/internal/noder/unified.go
@@ -34,38 +34,38 @@ var localPkgReader *pkgReader
 //
 // The pipeline contains 2 steps:
 //
-// (1) Generate package export data "stub".
+//  1) Generate package export data "stub".
 //
-// (2) Generate package IR from package export data.
+//  2) Generate package IR from package export data.
 //
 // The package data "stub" at step (1) contains everything from the local package,
 // but nothing that have been imported. When we're actually writing out export data
 // to the output files (see writeNewExport function), we run the "linker", which does
 // a few things:
 //
-// + Updates compiler extensions data (e.g., inlining cost, escape analysis results).
+//  + Updates compiler extensions data (e.g., inlining cost, escape analysis results).
 //
-// + Handles re-exporting any transitive dependencies.
+//  + Handles re-exporting any transitive dependencies.
 //
-// + Prunes out any unnecessary details (e.g., non-inlineable functions, because any
-//   downstream importers only care about inlinable functions).
+//  + Prunes out any unnecessary details (e.g., non-inlineable functions, because any
+//    downstream importers only care about inlinable functions).
 //
 // The source files are typechecked twice, once before writing export data
 // using types2 checker, once after read export data using gc/typecheck.
 // This duplication of work will go away once we always use types2 checker,
 // we can remove the gc/typecheck pass. The reason it is still here:
 //
-// + It reduces engineering costs in maintaining a fork of typecheck
-//   (e.g., no need to backport fixes like CL 327651).
+//  + It reduces engineering costs in maintaining a fork of typecheck
+//    (e.g., no need to backport fixes like CL 327651).
 //
-// + It makes it easier to pass toolstash -cmp.
+//  + It makes it easier to pass toolstash -cmp.
 //
-// + Historically, we would always re-run the typechecker after import, even though
-//   we know the imported data is valid. It's not ideal, but also not causing any
-//   problem either.
+//  + Historically, we would always re-run the typechecker after import, even though
+//    we know the imported data is valid. It's not ideal, but also not causing any
+//    problem either.
 //
-// + There's still transformation that being done during gc/typecheck, like rewriting
-//   multi-valued function call, or transform ir.OINDEX -> ir.OINDEXMAP.
+//  + There's still transformation that being done during gc/typecheck, like rewriting
+//    multi-valued function call, or transform ir.OINDEX -> ir.OINDEXMAP.
 //
 // Using syntax+types2 tree, which already has a complete representation of generics,
 // the unified IR has the full typed AST for doing introspection during step (1).
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index c49444179e..908f81865e 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -667,10 +667,10 @@ var kinds = []int{
 // tflag is documented in reflect/type.go.
 //
 // tflag values must be kept in sync with copies in:
-//	cmd/compile/internal/reflectdata/reflect.go
-//	cmd/link/internal/ld/decodesym.go
-//	reflect/type.go
-//	runtime/type.go
+//	- cmd/compile/internal/reflectdata/reflect.go
+//	- cmd/link/internal/ld/decodesym.go
+//	- reflect/type.go
+//	- runtime/type.go
 const (
 	tflagUncommon      = 1 << 0
 	tflagExtraStar     = 1 << 1
diff --git a/src/cmd/compile/internal/ssa/block.go b/src/cmd/compile/internal/ssa/block.go
index 6ff3188f9b..4d21ade3e3 100644
--- a/src/cmd/compile/internal/ssa/block.go
+++ b/src/cmd/compile/internal/ssa/block.go
@@ -76,10 +76,10 @@ type Block struct {
 //   d.Preds = [?, {b,1}, ?]
 // These indexes allow us to edit the CFG in constant time.
 // In addition, it informs phi ops in degenerate cases like:
-// b:
-//    if k then c else c
-// c:
-//    v = Phi(x, y)
+//  b:
+//     if k then c else c
+//  c:
+//     v = Phi(x, y)
 // Then the indexes tell you whether x is chosen from
 // the if or else branch from b.
 //   b.Succs = [{c,0},{c,1}]
@@ -105,6 +105,7 @@ func (e Edge) String() string {
 	return fmt.Sprintf("{%v,%d}", e.b, e.i)
 }
 
+// BlockKind is the kind of SSA block.
 //     kind          controls        successors
 //   ------------------------------------------
 //     Exit      [return mem]                []
diff --git a/src/cmd/compile/internal/ssa/branchelim.go b/src/cmd/compile/internal/ssa/branchelim.go
index be5f9e0a8b..59773ef31b 100644
--- a/src/cmd/compile/internal/ssa/branchelim.go
+++ b/src/cmd/compile/internal/ssa/branchelim.go
@@ -11,11 +11,11 @@ import "cmd/internal/src"
 //
 // Search for basic blocks that look like
 //
-// bb0            bb0
-//  | \          /   \
-//  | bb1  or  bb1   bb2    <- trivial if/else blocks
-//  | /          \   /
-// bb2            bb3
+//  bb0            bb0
+//   | \          /   \
+//   | bb1  or  bb1   bb2    <- trivial if/else blocks
+//   | /          \   /
+//  bb2            bb3
 //
 // where the intermediate blocks are mostly empty (with no side-effects);
 // rewrite Phis in the postdominator as CondSelects.
diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go
index f87ea5b893..d006bf9a3b 100644
--- a/src/cmd/compile/internal/ssa/compile.go
+++ b/src/cmd/compile/internal/ssa/compile.go
@@ -24,10 +24,10 @@ import (
 
 // Compile is the main entry point for this package.
 // Compile modifies f so that on return:
-//   · all Values in f map to 0 or 1 assembly instructions of the target architecture
-//   · the order of f.Blocks is the order to emit the Blocks
-//   · the order of b.Values is the order to emit the Values in each Block
-//   · f has a non-nil regAlloc field
+//   - all Values in f map to 0 or 1 assembly instructions of the target architecture
+//   - the order of f.Blocks is the order to emit the Blocks
+//   - the order of b.Values is the order to emit the Values in each Block
+//   - f has a non-nil regAlloc field
 func Compile(f *Func) {
 	// TODO: debugging - set flags to control verbosity of compiler,
 	// which phases to dump IR before/after, etc.
@@ -250,8 +250,8 @@ var GenssaDump map[string]bool = make(map[string]bool) // names of functions to
 // version is used as a regular expression to match the phase name(s).
 //
 // Special cases that have turned out to be useful:
-//  ssa/check/on enables checking after each phase
-//  ssa/all/time enables time reporting for all phases
+//  - ssa/check/on enables checking after each phase
+//  - ssa/all/time enables time reporting for all phases
 //
 // See gc/lex.go for dissection of the option string.
 // Example uses:
diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go
index 7728a395e0..0b5392f0f0 100644
--- a/src/cmd/compile/internal/ssa/func.go
+++ b/src/cmd/compile/internal/ssa/func.go
@@ -820,12 +820,12 @@ func (f *Func) invalidateCFG() {
 }
 
 // DebugHashMatch reports whether environment variable evname
-// 1) is empty (this is a special more-quickly implemented case of 3)
-// 2) is "y" or "Y"
-// 3) is a suffix of the sha1 hash of name
-// 4) is a suffix of the environment variable
-//    fmt.Sprintf("%s%d", evname, n)
-//    provided that all such variables are nonempty for 0 <= i <= n
+//  1) is empty (this is a special more-quickly implemented case of 3)
+//  2) is "y" or "Y"
+//  3) is a suffix of the sha1 hash of name
+//  4) is a suffix of the environment variable
+//     fmt.Sprintf("%s%d", evname, n)
+//     provided that all such variables are nonempty for 0 <= i <= n
 // Otherwise it returns false.
 // When true is returned the message
 //  "%s triggered %s\n", evname, name
diff --git a/src/cmd/compile/internal/ssa/fuse_branchredirect.go b/src/cmd/compile/internal/ssa/fuse_branchredirect.go
index 751dca7468..27449db55a 100644
--- a/src/cmd/compile/internal/ssa/fuse_branchredirect.go
+++ b/src/cmd/compile/internal/ssa/fuse_branchredirect.go
@@ -8,21 +8,21 @@ package ssa
 // of an If block can be derived from its predecessor If block, in
 // some such cases, we can redirect the predecessor If block to the
 // corresponding successor block directly. For example:
-// p:
-//   v11 = Less64  v10 v8
-//   If v11 goto b else u
-// b: <- p ...
-//   v17 = Leq64  v10 v8
-//   If v17 goto s else o
+//  p:
+//    v11 = Less64  v10 v8
+//    If v11 goto b else u
+//  b: <- p ...
+//    v17 = Leq64  v10 v8
+//    If v17 goto s else o
 // We can redirect p to s directly.
 //
 // The implementation here borrows the framework of the prove pass.
-// 1, Traverse all blocks of function f to find If blocks.
-// 2,   For any If block b, traverse all its predecessors to find If blocks.
-// 3,     For any If block predecessor p, update relationship p->b.
-// 4,     Traverse all successors of b.
-// 5,       For any successor s of b, try to update relationship b->s, if a
-//          contradiction is found then redirect p to another successor of b.
+//  1, Traverse all blocks of function f to find If blocks.
+//  2,   For any If block b, traverse all its predecessors to find If blocks.
+//  3,     For any If block predecessor p, update relationship p->b.
+//  4,     Traverse all successors of b.
+//  5,       For any successor s of b, try to update relationship b->s, if a
+//           contradiction is found then redirect p to another successor of b.
 func fuseBranchRedirect(f *Func) bool {
 	ft := newFactsTable(f)
 	ft.checkpoint()
diff --git a/src/cmd/compile/internal/ssa/location.go b/src/cmd/compile/internal/ssa/location.go
index b575febd72..d69db404ed 100644
--- a/src/cmd/compile/internal/ssa/location.go
+++ b/src/cmd/compile/internal/ssa/location.go
@@ -46,19 +46,19 @@ func (r *Register) GCNum() int16 {
 // variable that has been decomposed into multiple stack slots.
 // As an example, a string could have the following configurations:
 //
-//           stack layout              LocalSlots
+//            stack layout              LocalSlots
 //
-// Optimizations are disabled. s is on the stack and represented in its entirety.
-// [ ------- s string ---- ] { N: s, Type: string, Off: 0 }
+//  Optimizations are disabled. s is on the stack and represented in its entirety.
+//  [ ------- s string ---- ] { N: s, Type: string, Off: 0 }
 //
-// s was not decomposed, but the SSA operates on its parts individually, so
-// there is a LocalSlot for each of its fields that points into the single stack slot.
-// [ ------- s string ---- ] { N: s, Type: *uint8, Off: 0 }, {N: s, Type: int, Off: 8}
+//  s was not decomposed, but the SSA operates on its parts individually, so
+//  there is a LocalSlot for each of its fields that points into the single stack slot.
+//  [ ------- s string ---- ] { N: s, Type: *uint8, Off: 0 }, {N: s, Type: int, Off: 8}
 //
-// s was decomposed. Each of its fields is in its own stack slot and has its own LocalSLot.
-// [ ptr *uint8 ] [ len int] { N: ptr, Type: *uint8, Off: 0, SplitOf: parent, SplitOffset: 0},
-//                           { N: len, Type: int, Off: 0, SplitOf: parent, SplitOffset: 8}
-//                           parent = &{N: s, Type: string}
+//  s was decomposed. Each of its fields is in its own stack slot and has its own LocalSLot.
+//  [ ptr *uint8 ] [ len int] { N: ptr, Type: *uint8, Off: 0, SplitOf: parent, SplitOffset: 0},
+//                            { N: len, Type: int, Off: 0, SplitOf: parent, SplitOffset: 8}
+//                            parent = &{N: s, Type: string}
 type LocalSlot struct {
 	N    *ir.Name    // an ONAME *ir.Name representing a stack location.
 	Type *types.Type // type of slot
diff --git a/src/cmd/compile/internal/ssa/loopbce.go b/src/cmd/compile/internal/ssa/loopbce.go
index 5a4bc1d60a..206aab2c5e 100644
--- a/src/cmd/compile/internal/ssa/loopbce.go
+++ b/src/cmd/compile/internal/ssa/loopbce.go
@@ -66,18 +66,18 @@ func parseIndVar(ind *Value) (min, inc, nxt *Value) {
 //
 // Look for variables and blocks that satisfy the following
 //
-// loop:
-//   ind = (Phi min nxt),
-//   if ind < max
-//     then goto enter_loop
-//     else goto exit_loop
+//  loop:
+//    ind = (Phi min nxt),
+//    if ind < max
+//      then goto enter_loop
+//      else goto exit_loop
 //
-//   enter_loop:
-//	do something
-//      nxt = inc + ind
-//	goto loop
+//    enter_loop:
+// 	do something
+//       nxt = inc + ind
+// 	goto loop
 //
-// exit_loop:
+//  exit_loop:
 //
 //
 // TODO: handle 32 bit operations
diff --git a/src/cmd/compile/internal/ssa/phiopt.go b/src/cmd/compile/internal/ssa/phiopt.go
index 745c61cb86..0357442ae9 100644
--- a/src/cmd/compile/internal/ssa/phiopt.go
+++ b/src/cmd/compile/internal/ssa/phiopt.go
@@ -15,12 +15,12 @@ package ssa
 //
 // In SSA code this appears as
 //
-// b0
-//   If b -> b1 b2
-// b1
-//   Plain -> b2
-// b2
-//   x = (OpPhi (ConstBool [true]) (ConstBool [false]))
+//  b0
+//    If b -> b1 b2
+//  b1
+//    Plain -> b2
+//  b2
+//    x = (OpPhi (ConstBool [true]) (ConstBool [false]))
 //
 // In this case we can replace x with a copy of b.
 func phiopt(f *Func) {
diff --git a/src/cmd/compile/internal/ssa/prove.go b/src/cmd/compile/internal/ssa/prove.go
index 98af586cab..d0c9a190ad 100644
--- a/src/cmd/compile/internal/ssa/prove.go
+++ b/src/cmd/compile/internal/ssa/prove.go
@@ -27,17 +27,17 @@ const (
 //
 // E.g.
 //
-// r := relation(...)
+//  r := relation(...)
 //
-// if v < w {
-//   newR := r & lt
-// }
-// if v >= w {
-//   newR := r & (eq|gt)
-// }
-// if v != w {
-//   newR := r & (lt|gt)
-// }
+//  if v < w {
+//    newR := r & lt
+//  }
+//  if v >= w {
+//    newR := r & (eq|gt)
+//  }
+//  if v != w {
+//    newR := r & (lt|gt)
+//  }
 type relation uint
 
 const (
diff --git a/src/cmd/compile/internal/ssa/sparsetree.go b/src/cmd/compile/internal/ssa/sparsetree.go
index be914c8644..732bb8e321 100644
--- a/src/cmd/compile/internal/ssa/sparsetree.go
+++ b/src/cmd/compile/internal/ssa/sparsetree.go
@@ -207,8 +207,8 @@ func (t SparseTree) isAncestor(x, y *Block) bool {
 // domorder returns a value for dominator-oriented sorting.
 // Block domination does not provide a total ordering,
 // but domorder two has useful properties.
-// (1) If domorder(x) > domorder(y) then x does not dominate y.
-// (2) If domorder(x) < domorder(y) and domorder(y) < domorder(z) and x does not dominate y,
+//  1. If domorder(x) > domorder(y) then x does not dominate y.
+//  2. If domorder(x) < domorder(y) and domorder(y) < domorder(z) and x does not dominate y,
 //     then x does not dominate z.
 // Property (1) means that blocks sorted by domorder always have a maximal dominant block first.
 // Property (2) allows searches for dominated blocks to exit early.
diff --git a/src/cmd/compile/internal/ssa/writebarrier.go b/src/cmd/compile/internal/ssa/writebarrier.go
index 5120cd1086..21eee12c85 100644
--- a/src/cmd/compile/internal/ssa/writebarrier.go
+++ b/src/cmd/compile/internal/ssa/writebarrier.go
@@ -80,11 +80,11 @@ func needwb(v *Value, zeroes map[ID]ZeroRegion) bool {
 // when necessary (the condition above). It rewrites store ops to branches
 // and runtime calls, like
 //
-// if writeBarrier.enabled {
-//   gcWriteBarrier(ptr, val)	// Not a regular Go call
-// } else {
-//   *ptr = val
-// }
+//	if writeBarrier.enabled {
+//		gcWriteBarrier(ptr, val)	// Not a regular Go call
+//	} else {
+//		*ptr = val
+//	}
 //
 // A sequence of WB stores for many pointer fields of a single type will
 // be emitted together, with a single branch.
diff --git a/src/cmd/compile/internal/syntax/parser.go b/src/cmd/compile/internal/syntax/parser.go
index 39ea0cc224..6574b01371 100644
--- a/src/cmd/compile/internal/syntax/parser.go
+++ b/src/cmd/compile/internal/syntax/parser.go
@@ -1022,22 +1022,24 @@ func (p *parser) operand(keep_parens bool) Expr {
 	// as well (operand is only called from pexpr).
 }
 
-// PrimaryExpr =
-// 	Operand |
-// 	Conversion |
-// 	PrimaryExpr Selector |
-// 	PrimaryExpr Index |
-// 	PrimaryExpr Slice |
-// 	PrimaryExpr TypeAssertion |
-// 	PrimaryExpr Arguments .
+// pexpr parses a PrimaryExpr.
 //
-// Selector       = "." identifier .
-// Index          = "[" Expression "]" .
-// Slice          = "[" ( [ Expression ] ":" [ Expression ] ) |
-//                      ( [ Expression ] ":" Expression ":" Expression )
-//                  "]" .
-// TypeAssertion  = "." "(" Type ")" .
-// Arguments      = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ "..." ] [ "," ] ] ")" .
+//	PrimaryExpr =
+//		Operand |
+//		Conversion |
+//		PrimaryExpr Selector |
+//		PrimaryExpr Index |
+//		PrimaryExpr Slice |
+//		PrimaryExpr TypeAssertion |
+//		PrimaryExpr Arguments .
+//
+//	Selector       = "." identifier .
+//	Index          = "[" Expression "]" .
+//	Slice          = "[" ( [ Expression ] ":" [ Expression ] ) |
+//	                     ( [ Expression ] ":" Expression ":" Expression )
+//	                 "]" .
+//	TypeAssertion  = "." "(" Type ")" .
+//	Arguments      = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ "..." ] [ "," ] ] ")" .
 func (p *parser) pexpr(x Expr, keep_parens bool) Expr {
 	if trace {
 		defer p.trace("pexpr")()
@@ -1283,10 +1285,10 @@ func newIndirect(pos Pos, typ Expr) Expr {
 // typeOrNil is like type_ but it returns nil if there was no type
 // instead of reporting an error.
 //
-// Type     = TypeName | TypeLit | "(" Type ")" .
-// TypeName = identifier | QualifiedIdent .
-// TypeLit  = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
-// 	      SliceType | MapType | Channel_Type .
+//	Type     = TypeName | TypeLit | "(" Type ")" .
+//	TypeName = identifier | QualifiedIdent .
+//	TypeLit  = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
+//		      SliceType | MapType | Channel_Type .
 func (p *parser) typeOrNil() Expr {
 	if trace {
 		defer p.trace("typeOrNil")()
@@ -2519,11 +2521,13 @@ func (p *parser) commClause() *CommClause {
 	return c
 }
 
-// Statement =
-// 	Declaration | LabeledStmt | SimpleStmt |
-// 	GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
-// 	FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
-// 	DeferStmt .
+// stmtOrNil parses a statement if one is present, or else returns nil.
+//
+//	Statement =
+//		Declaration | LabeledStmt | SimpleStmt |
+//		GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
+//		FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
+//		DeferStmt .
 func (p *parser) stmtOrNil() Stmt {
 	if trace {
 		defer p.trace("stmt " + p.tok.String())()
diff --git a/src/cmd/compile/internal/typecheck/subr.go b/src/cmd/compile/internal/typecheck/subr.go
index e9690a5551..d4ec52adf9 100644
--- a/src/cmd/compile/internal/typecheck/subr.go
+++ b/src/cmd/compile/internal/typecheck/subr.go
@@ -1476,14 +1476,14 @@ func getShapes(t *types.Type, listp *[]*types.Type) {
 // For now, we only consider two types to have the same shape, if they have exactly
 // the same underlying type or they are both pointer types.
 //
-//  tparam is the associated typeparam - it must be TTYPEPARAM type. If there is a
-//  structural type for the associated type param (not common), then a pointer type t
-//  is mapped to its underlying type, rather than being merged with other pointers.
+// tparam is the associated typeparam - it must be TTYPEPARAM type. If there is a
+// structural type for the associated type param (not common), then a pointer type t
+// is mapped to its underlying type, rather than being merged with other pointers.
 //
-//  Shape types are also distinguished by the index of the type in a type param/arg
-//  list. We need to do this so we can distinguish and substitute properly for two
-//  type params in the same function that have the same shape for a particular
-//  instantiation.
+// Shape types are also distinguished by the index of the type in a type param/arg
+// list. We need to do this so we can distinguish and substitute properly for two
+// type params in the same function that have the same shape for a particular
+// instantiation.
 func Shapify(t *types.Type, index int, tparam *types.Type) *types.Type {
 	assert(!t.IsShape())
 	if t.HasShape() {
diff --git a/src/cmd/compile/internal/types/size.go b/src/cmd/compile/internal/types/size.go
index fc9907b85f..9fa3e49e34 100644
--- a/src/cmd/compile/internal/types/size.go
+++ b/src/cmd/compile/internal/types/size.go
@@ -17,18 +17,18 @@ var RegSize int
 
 // Slices in the runtime are represented by three components:
 //
-// type slice struct {
-// 	ptr unsafe.Pointer
-// 	len int
-// 	cap int
-// }
+//	type slice struct {
+//		ptr unsafe.Pointer
+//		len int
+//		cap int
+//	}
 //
 // Strings in the runtime are represented by two components:
 //
-// type string struct {
-// 	ptr unsafe.Pointer
-// 	len int
-// }
+//	type string struct {
+//		ptr unsafe.Pointer
+//		len int
+//	}
 //
 // These variables are the offsets of fields and sizes of these structs.
 var (
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index c8d11b5bb9..147194c369 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -1121,9 +1121,9 @@ func (t *Type) SimpleString() string {
 }
 
 // Cmp is a comparison between values a and b.
-// -1 if a < b
-//  0 if a == b
-//  1 if a > b
+//  -1 if a < b
+//   0 if a == b
+//   1 if a > b
 type Cmp int8
 
 const (
diff --git a/src/cmd/compile/internal/types2/infer.go b/src/cmd/compile/internal/types2/infer.go
index 78fc35b72a..9f7e593eeb 100644
--- a/src/cmd/compile/internal/types2/infer.go
+++ b/src/cmd/compile/internal/types2/infer.go
@@ -21,9 +21,8 @@ const useConstraintTypeInference = true
 // If successful, infer returns the complete list of type arguments, one for each type parameter.
 // Otherwise the result is nil and appropriate errors will be reported.
 //
-// Inference proceeds as follows:
+// Inference proceeds as follows. Starting with given type arguments:
 //
-//   Starting with given type arguments
 //   1) apply FTI (function type inference) with typed arguments,
 //   2) apply CTI (constraint type inference),
 //   3) apply FTI with untyped function arguments,
diff --git a/src/cmd/compile/internal/types2/object.go b/src/cmd/compile/internal/types2/object.go
index 08d37cb256..ee7c8a8488 100644
--- a/src/cmd/compile/internal/types2/object.go
+++ b/src/cmd/compile/internal/types2/object.go
@@ -343,7 +343,7 @@ func NewParam(pos syntax.Pos, pkg *Package, name string, typ Type) *Var {
 
 // NewField returns a new variable representing a struct field.
 // For embedded fields, the name is the unqualified type name
-/// under which the field is accessible.
+// under which the field is accessible.
 func NewField(pos syntax.Pos, pkg *Package, name string, typ Type, embedded bool) *Var {
 	return &Var{object: object{nil, pos, pkg, name, typ, 0, colorFor(typ), nopos}, embedded: embedded, isField: true}
 }
diff --git a/src/cmd/compile/internal/walk/builtin.go b/src/cmd/compile/internal/walk/builtin.go
index b25627bd22..8fe231161a 100644
--- a/src/cmd/compile/internal/walk/builtin.go
+++ b/src/cmd/compile/internal/walk/builtin.go
@@ -125,12 +125,12 @@ func walkClose(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
 
 // Lower copy(a, b) to a memmove call or a runtime call.
 //
-// init {
-//   n := len(a)
-//   if n > len(b) { n = len(b) }
-//   if a.ptr != b.ptr { memmove(a.ptr, b.ptr, n*sizeof(elem(a))) }
-// }
-// n;
+//	init {
+//	  n := len(a)
+//	  if n > len(b) { n = len(b) }
+//	  if a.ptr != b.ptr { memmove(a.ptr, b.ptr, n*sizeof(elem(a))) }
+//	}
+//	n;
 //
 // Also works if b is a string.
 //
diff --git a/src/cmd/compile/internal/walk/range.go b/src/cmd/compile/internal/walk/range.go
index aa8c548963..dcf7a786e7 100644
--- a/src/cmd/compile/internal/walk/range.go
+++ b/src/cmd/compile/internal/walk/range.go
@@ -316,9 +316,9 @@ func walkRange(nrange *ir.RangeStmt) ir.Node {
 
 // isMapClear checks if n is of the form:
 //
-// for k := range m {
-//   delete(m, k)
-// }
+//	for k := range m {
+//		delete(m, k)
+//	}
 //
 // where == for keys of map m is reflexive.
 func isMapClear(n *ir.RangeStmt) bool {
@@ -374,9 +374,9 @@ func mapClear(m ir.Node) ir.Node {
 // fast zeroing of slices and arrays (issue 5373).
 // Look for instances of
 //
-// for i := range a {
-// 	a[i] = zero
-// }
+//	for i := range a {
+//		a[i] = zero
+//	}
 //
 // in which the evaluation of a is side-effect-free.
 //
diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go
index caafc13da8..520dde7050 100644
--- a/src/cmd/dist/buildgo.go
+++ b/src/cmd/dist/buildgo.go
@@ -97,7 +97,7 @@ func mkzosarch(dir, file string) {
 // mkzcgo writes zcgo.go for the go/build package:
 //
 //	package build
-//  var cgoEnabled = map[string]bool{}
+//	var cgoEnabled = map[string]bool{}
 //
 // It is invoked to write go/build/zcgo.go.
 func mkzcgo(dir, file string) {
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go
index bffbe32220..76a2b85f96 100644
--- a/src/cmd/go/script_test.go
+++ b/src/cmd/go/script_test.go
@@ -1373,7 +1373,9 @@ type command struct {
 // parse parses a single line as a list of space-separated arguments
 // subject to environment variable expansion (but not resplitting).
 // Single quotes around text disable splitting and expansion.
-// To embed a single quote, double it: 'Don''t communicate by sharing memory.'
+// To embed a single quote, double it:
+//
+//	'Don''t communicate by sharing memory.'
 func (ts *testScript) parse(line string) command {
 	ts.line = line
 
diff --git a/src/cmd/internal/goobj/objfile.go b/src/cmd/internal/goobj/objfile.go
index ff225bedd7..af2a0df338 100644
--- a/src/cmd/internal/goobj/objfile.go
+++ b/src/cmd/internal/goobj/objfile.go
@@ -264,15 +264,15 @@ func (p *ImportedPkg) Write(w *Writer) {
 // Symbol definition.
 //
 // Serialized format:
-// Sym struct {
-//    Name  string
-//    ABI   uint16
-//    Type  uint8
-//    Flag  uint8
-//    Flag2 uint8
-//    Siz   uint32
-//    Align uint32
-// }
+//   Sym struct {
+//      Name  string
+//      ABI   uint16
+//      Type  uint8
+//      Flag  uint8
+//      Flag2 uint8
+//      Siz   uint32
+//      Align uint32
+//   }
 type Sym [SymSize]byte
 
 const SymSize = stringRefSize + 2 + 1 + 1 + 1 + 4 + 4
@@ -371,13 +371,13 @@ const HashSize = sha1.Size
 // Relocation.
 //
 // Serialized format:
-// Reloc struct {
-//    Off  int32
-//    Siz  uint8
-//    Type uint16
-//    Add  int64
-//    Sym  SymRef
-// }
+//   Reloc struct {
+//      Off  int32
+//      Siz  uint8
+//      Type uint16
+//      Add  int64
+//      Sym  SymRef
+//   }
 type Reloc [RelocSize]byte
 
 const RelocSize = 4 + 1 + 2 + 8 + 8
@@ -415,10 +415,10 @@ func (r *Reloc) fromBytes(b []byte) { copy(r[:], b) }
 // Aux symbol info.
 //
 // Serialized format:
-// Aux struct {
-//    Type uint8
-//    Sym  SymRef
-// }
+//   Aux struct {
+//      Type uint8
+//      Sym  SymRef
+//   }
 type Aux [AuxSize]byte
 
 const AuxSize = 1 + 8
@@ -458,11 +458,11 @@ func (a *Aux) fromBytes(b []byte) { copy(a[:], b) }
 // Referenced symbol flags.
 //
 // Serialized format:
-// RefFlags struct {
-//    Sym   symRef
-//    Flag  uint8
-//    Flag2 uint8
-// }
+//   RefFlags struct {
+//      Sym   symRef
+//      Flag  uint8
+//      Flag2 uint8
+//   }
 type RefFlags [RefFlagsSize]byte
 
 const RefFlagsSize = 8 + 1 + 1
@@ -490,10 +490,10 @@ const huge = (1<<31 - 1) / RelocSize
 // Referenced symbol name.
 //
 // Serialized format:
-// RefName struct {
-//    Sym  symRef
-//    Name string
-// }
+//   RefName struct {
+//      Sym  symRef
+//      Name string
+//   }
 type RefName [RefNameSize]byte
 
 const RefNameSize = 8 + stringRefSize
diff --git a/src/cmd/internal/obj/arm64/doc.go b/src/cmd/internal/obj/arm64/doc.go
index 1234a3e818..2763cf4139 100644
--- a/src/cmd/internal/obj/arm64/doc.go
+++ b/src/cmd/internal/obj/arm64/doc.go
@@ -11,7 +11,7 @@ Instructions mnemonics mapping rules
 1. Most instructions use width suffixes of instruction names to indicate operand width rather than
 using different register names.
 
-  Examples:
+Examples:
     ADC R24, R14, R12          <=>     adc x12, x24
     ADDW R26->24, R21, R15     <=>     add w15, w21, w26, asr #24
     FCMPS F2, F3               <=>     fcmp s3, s2
@@ -20,7 +20,7 @@ using different register names.
 
 2. Go uses .P and .W suffixes to indicate post-increment and pre-increment.
 
-  Examples:
+Examples:
     MOVD.P -8(R10), R8         <=>      ldr x8, [x10],#-8
     MOVB.W 16(R16), R10        <=>      ldrsb x10, [x16,#16]!
     MOVBU.W 16(R16), R10       <=>      ldrb x10, [x16,#16]!
@@ -39,7 +39,7 @@ ldrsh, sturh, strh =>  MOVH.
 5. Go adds a V prefix for most floating-point and SIMD instructions, except cryptographic extension
 instructions and floating-point(scalar) instructions.
 
-  Examples:
+Examples:
     VADD V5.H8, V18.H8, V9.H8         <=>      add v9.8h, v18.8h, v5.8h
     VLD1.P (R6)(R11), [V31.D1]        <=>      ld1 {v31.1d}, [x6], x11
     VFMLA V29.S2, V20.S2, V14.S2      <=>      fmla v14.2s, v20.2s, v29.2s
@@ -52,7 +52,7 @@ Go asm supports the PCALIGN directive, which indicates that the next instruction
 to a specified boundary by padding with NOOP instruction. The alignment value supported on arm64
 must be a power of 2 and in the range of [8, 2048].
 
-  Examples:
+Examples:
     PCALIGN $16
     MOVD $2, R0          // This instruction is aligned with 16 bytes.
     PCALIGN $1024
@@ -63,7 +63,8 @@ its address will be aligned to the same or coarser boundary, which is the maximu
 alignment values.
 
 In the following example, the function Add is aligned with 128 bytes.
-  Examples:
+
+Examples:
     TEXT ·Add(SB),$40-16
     MOVD $2, R0
     PCALIGN $32
@@ -79,7 +80,7 @@ have the same alignment as the first hand-written instruction.
 
 In the following example, PCALIGN at the entry of the function Add will align its address to 2048 bytes.
 
-  Examples:
+Examples:
     TEXT ·Add(SB),NOSPLIT|NOFRAME,$0
       PCALIGN $2048
       MOVD $1, R0
@@ -91,7 +92,7 @@ In the following example, PCALIGN at the entry of the function Add will align it
 Go asm uses VMOVQ/VMOVD/VMOVS to move 128-bit, 64-bit and 32-bit constants into vector registers, respectively.
 And for a 128-bit interger, it take two 64-bit operands, for the low and high parts separately.
 
-  Examples:
+Examples:
     VMOVS $0x11223344, V0
     VMOVD $0x1122334455667788, V1
     VMOVQ $0x1122334455667788, $0x99aabbccddeeff00, V2   // V2=0x99aabbccddeeff001122334455667788
@@ -104,7 +105,7 @@ is the 16-bit unsigned immediate, in the range 0 to 65535; For the 32-bit varian
 
 The current Go assembler does not accept zero shifts, such as "op $0, Rd" and "op $(0<<(16|32|48)), Rd" instructions.
 
-  Examples:
+Examples:
     MOVK $(10<<32), R20     <=>      movk x20, #10, lsl #32
     MOVZW $(20<<16), R8     <=>      movz w8, #20, lsl #16
     MOVK $(0<<16), R10 will be reported as an error by the assembler.
@@ -121,7 +122,7 @@ Special Cases.
 related to real ARM64 instruction. NOOP serves for the hardware nop instruction. NOOP is an alias of
 HINT $0.
 
-  Examples:
+Examples:
     VMOV V13.B[1], R20      <=>      mov x20, v13.b[1]
     VMOV V13.H[1], R20      <=>      mov w20, v13.h[1]
     JMP (R3)                <=>      br x3
@@ -146,7 +147,7 @@ Argument mapping rules
 
 Go reverses the arguments of most instructions.
 
-    Examples:
+Examples:
       ADD R11.SXTB<<1, RSP, R25      <=>      add x25, sp, w11, sxtb #1
       VADD V16, V19, V14             <=>      add d14, d19, d16
 
@@ -155,32 +156,32 @@ Special Cases.
 (1) Argument order is the same as in the GNU ARM64 syntax: cbz, cbnz and some store instructions,
 such as str, stur, strb, sturb, strh, sturh stlr, stlrb. stlrh, st1.
 
-  Examples:
+Examples:
     MOVD R29, 384(R19)    <=>    str x29, [x19,#384]
     MOVB.P R30, 30(R4)    <=>    strb w30, [x4],#30
     STLRH R21, (R19)      <=>    stlrh w21, [x19]
 
 (2) MADD, MADDW, MSUB, MSUBW, SMADDL, SMSUBL, UMADDL, UMSUBL , , , 
 
-  Examples:
+Examples:
     MADD R2, R30, R22, R6       <=>    madd x6, x22, x2, x30
     SMSUBL R10, R3, R17, R27    <=>    smsubl x27, w17, w10, x3
 
 (3) FMADDD, FMADDS, FMSUBD, FMSUBS, FNMADDD, FNMADDS, FNMSUBD, FNMSUBS , , , 
 
-  Examples:
+Examples:
     FMADDD F30, F20, F3, F29    <=>    fmadd d29, d3, d30, d20
     FNMSUBS F7, F25, F7, F22    <=>    fnmsub s22, s7, s7, s25
 
 (4) BFI, BFXIL, SBFIZ, SBFX, UBFIZ, UBFX $, , $, 
 
-  Examples:
+Examples:
     BFIW $16, R20, $6, R0      <=>    bfi w0, w20, #16, #6
     UBFIZ $34, R26, $5, R20    <=>    ubfiz x20, x26, #34, #5
 
 (5) FCCMPD, FCCMPS, FCCMPED, FCCMPES , Fm. Fn, $
 
-  Examples:
+Examples:
     FCCMPD AL, F8, F26, $0     <=>    fccmp d26, d8, #0x0, al
     FCCMPS VS, F29, F4, $4     <=>    fccmp s4, s29, #0x4, vs
     FCCMPED LE, F20, F5, $13   <=>    fccmpe d5, d20, #0xd, le
@@ -188,20 +189,20 @@ such as str, stur, strb, sturb, strh, sturh stlr, stlrb. stlrh, st1.
 
 (6) CCMN, CCMNW, CCMP, CCMPW , , $, $
 
-  Examples:
+Examples:
     CCMP MI, R22, $12, $13     <=>    ccmp x22, #0xc, #0xd, mi
     CCMNW AL, R1, $11, $8      <=>    ccmn w1, #0xb, #0x8, al
 
 (7) CCMN, CCMNW, CCMP, CCMPW , , , $
 
-  Examples:
+Examples:
     CCMN VS, R13, R22, $10     <=>    ccmn x13, x22, #0xa, vs
     CCMPW HS, R19, R14, $11    <=>    ccmp w19, w14, #0xb, cs
 
 (9) CSEL, CSELW, CSNEG, CSNEGW, CSINC, CSINCW , , ,  ;
 FCSELD, FCSELS , , , 
 
-  Examples:
+Examples:
     CSEL GT, R0, R19, R1        <=>    csel x1, x0, x19, gt
     CSNEGW GT, R7, R17, R8      <=>    csneg w8, w7, w17, gt
     FCSELD EQ, F15, F18, F16    <=>    fcsel d16, d15, d18, eq
@@ -211,13 +212,13 @@ FCSELD, FCSELS , , , 
 
 (11) STLXR, STLXRW, STXR, STXRW, STLXRB, STLXRH, STXRB, STXRH  , (), 
 
-  Examples:
+Examples:
     STLXR ZR, (R15), R16    <=>    stlxr w16, xzr, [x15]
     STXRB R9, (R21), R19    <=>    stxrb w19, w9, [x21]
 
 (12) STLXP, STLXPW, STXP, STXPW (, ), (), 
 
-  Examples:
+Examples:
     STLXP (R17, R19), (R4), R5      <=>    stlxp w5, x17, x19, [x4]
     STXPW (R30, R25), (R22), R13    <=>    stxp w13, w30, w25, [x22]
 
@@ -227,28 +228,28 @@ FCSELD, FCSELS , , , 
 
 Optionally-shifted immediate.
 
-  Examples:
+Examples:
     ADD $(3151<<12), R14, R20     <=>    add x20, x14, #0xc4f, lsl #12
     ADDW $1864, R25, R6           <=>    add w6, w25, #0x748
 
 Optionally-shifted registers are written as {}.
 The  can be <<(lsl), >>(lsr), ->(asr), @>(ror).
 
-  Examples:
+Examples:
     ADD R19>>30, R10, R24     <=>    add x24, x10, x19, lsr #30
     ADDW R26->24, R21, R15    <=>    add w15, w21, w26, asr #24
 
 Extended registers are written as {.{<<}}.
  can be UXTB, UXTH, UXTW, UXTX, SXTB, SXTH, SXTW or SXTX.
 
-  Examples:
+Examples:
     ADDS R19.UXTB<<4, R9, R26     <=>    adds x26, x9, w19, uxtb #4
     ADDSW R14.SXTX, R14, R6       <=>    adds w6, w14, w14, sxtx
 
 Memory references: [{,#0}] is written as (Rn|RSP), a base register and an immediate
 offset is written as imm(Rn|RSP), a base register and an offset register is written as (Rn|RSP)(Rm).
 
-  Examples:
+Examples:
     LDAR (R22), R9                  <=>    ldar x9, [x22]
     LDP 28(R17), (R15, R23)         <=>    ldp x15, x23, [x17,#28]
     MOVWU (R4)(R12<<2), R8          <=>    ldr w8, [x4, x12, lsl #2]
@@ -257,12 +258,12 @@ offset is written as imm(Rn|RSP), a base register and an offset register is writ
 
 Register pairs are written as (Rt1, Rt2).
 
-  Examples:
+Examples:
     LDP.P -240(R11), (R12, R26)    <=>    ldp x12, x26, [x11],#-240
 
 Register with arrangement and register with arrangement and index.
 
-  Examples:
+Examples:
     VADD V5.H8, V18.H8, V9.H8                     <=>    add v9.8h, v18.8h, v5.8h
     VLD1 (R2), [V21.B16]                          <=>    ld1 {v21.16b}, [x2]
     VST1.P V9.S[1], (R16)(R21)                    <=>    st1 {v9.s}[1], [x16], x28
diff --git a/src/cmd/internal/obj/inl.go b/src/cmd/internal/obj/inl.go
index 1b1d13a679..d65a7357a6 100644
--- a/src/cmd/internal/obj/inl.go
+++ b/src/cmd/internal/obj/inl.go
@@ -13,19 +13,19 @@ import "cmd/internal/src"
 // every time a function is inlined. For example, suppose f() calls g()
 // and g has two calls to h(), and that f, g, and h are inlineable:
 //
-//  1 func main() {
-//  2     f()
-//  3 }
-//  4 func f() {
-//  5     g()
-//  6 }
-//  7 func g() {
-//  8     h()
-//  9     h()
-// 10 }
-// 11 func h() {
-// 12     println("H")
-// 13 }
+//   1 func main() {
+//   2     f()
+//   3 }
+//   4 func f() {
+//   5     g()
+//   6 }
+//   7 func g() {
+//   8     h()
+//   9     h()
+//  10 }
+//  11 func h() {
+//  12     println("H")
+//  13 }
 //
 // Assuming the global tree starts empty, inlining will produce the
 // following tree:
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index 7bae31f343..e9302ee642 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -448,14 +448,14 @@ func contentHash64(s *LSym) goobj.Hash64Type {
 // Depending on the category of the referenced symbol, we choose
 // different hash algorithms such that the hash is globally
 // consistent.
-// - For referenced content-addressable symbol, its content hash
-//   is globally consistent.
-// - For package symbol and builtin symbol, its local index is
-//   globally consistent.
-// - For non-package symbol, its fully-expanded name is globally
-//   consistent. For now, we require we know the current package
-//   path so we can always expand symbol names. (Otherwise,
-//   symbols with relocations are not considered hashable.)
+//  - For referenced content-addressable symbol, its content hash
+//    is globally consistent.
+//  - For package symbol and builtin symbol, its local index is
+//    globally consistent.
+//  - For non-package symbol, its fully-expanded name is globally
+//    consistent. For now, we require we know the current package
+//    path so we can always expand symbol names. (Otherwise,
+//    symbols with relocations are not considered hashable.)
 //
 // For now, we assume there is no circular dependencies among
 // hashed symbols.
diff --git a/src/cmd/internal/obj/ppc64/doc.go b/src/cmd/internal/obj/ppc64/doc.go
index a9d89c93b4..bdaeaf69e1 100644
--- a/src/cmd/internal/obj/ppc64/doc.go
+++ b/src/cmd/internal/obj/ppc64/doc.go
@@ -23,207 +23,212 @@ In the examples below, the Go assembly is on the left, PPC64 assembly on the rig
 
 1. Operand ordering
 
-  In Go asm, the last operand (right) is the target operand, but with PPC64 asm,
-  the first operand (left) is the target. The order of the remaining operands is
-  not consistent: in general opcodes with 3 operands that perform math or logical
-  operations have their operands in reverse order. Opcodes for vector instructions
-  and those with more than 3 operands usually have operands in the same order except
-  for the target operand, which is first in PPC64 asm and last in Go asm.
+In Go asm, the last operand (right) is the target operand, but with PPC64 asm,
+the first operand (left) is the target. The order of the remaining operands is
+not consistent: in general opcodes with 3 operands that perform math or logical
+operations have their operands in reverse order. Opcodes for vector instructions
+and those with more than 3 operands usually have operands in the same order except
+for the target operand, which is first in PPC64 asm and last in Go asm.
 
-  Example:
-    ADD R3, R4, R5		<=>	add r5, r4, r3
+Example:
+
+  ADD R3, R4, R5		<=>	add r5, r4, r3
 
 2. Constant operands
 
-  In Go asm, an operand that starts with '$' indicates a constant value. If the
-  instruction using the constant has an immediate version of the opcode, then an
-  immediate value is used with the opcode if possible.
+In Go asm, an operand that starts with '$' indicates a constant value. If the
+instruction using the constant has an immediate version of the opcode, then an
+immediate value is used with the opcode if possible.
+
+Example:
 
-  Example:
-    ADD $1, R3, R4		<=> 	addi r4, r3, 1
+  ADD $1, R3, R4		<=> 	addi r4, r3, 1
 
 3. Opcodes setting condition codes
 
-  In PPC64 asm, some instructions other than compares have variations that can set
-  the condition code where meaningful. This is indicated by adding '.' to the end
-  of the PPC64 instruction. In Go asm, these instructions have 'CC' at the end of
-  the opcode. The possible settings of the condition code depend on the instruction.
-  CR0 is the default for fixed-point instructions; CR1 for floating point; CR6 for
-  vector instructions.
+In PPC64 asm, some instructions other than compares have variations that can set
+the condition code where meaningful. This is indicated by adding '.' to the end
+of the PPC64 instruction. In Go asm, these instructions have 'CC' at the end of
+the opcode. The possible settings of the condition code depend on the instruction.
+CR0 is the default for fixed-point instructions; CR1 for floating point; CR6 for
+vector instructions.
+
+Example:
 
-  Example:
-    ANDCC R3, R4, R5		<=>	and. r5, r3, r4 (set CR0)
+  ANDCC R3, R4, R5		<=>	and. r5, r3, r4 (set CR0)
 
 4. Loads and stores from memory
 
-  In Go asm, opcodes starting with 'MOV' indicate a load or store. When the target
-  is a memory reference, then it is a store; when the target is a register and the
-  source is a memory reference, then it is a load.
+In Go asm, opcodes starting with 'MOV' indicate a load or store. When the target
+is a memory reference, then it is a store; when the target is a register and the
+source is a memory reference, then it is a load.
 
-  MOV{B,H,W,D} variations identify the size as byte, halfword, word, doubleword.
+MOV{B,H,W,D} variations identify the size as byte, halfword, word, doubleword.
 
-  Adding 'Z' to the opcode for a load indicates zero extend; if omitted it is sign extend.
-  Adding 'U' to a load or store indicates an update of the base register with the offset.
-  Adding 'BR' to an opcode indicates byte-reversed load or store, or the order opposite
-  of the expected endian order. If 'BR' is used then zero extend is assumed.
+Adding 'Z' to the opcode for a load indicates zero extend; if omitted it is sign extend.
+Adding 'U' to a load or store indicates an update of the base register with the offset.
+Adding 'BR' to an opcode indicates byte-reversed load or store, or the order opposite
+of the expected endian order. If 'BR' is used then zero extend is assumed.
 
-  Memory references n(Ra) indicate the address in Ra + n. When used with an update form
-  of an opcode, the value in Ra is incremented by n.
+Memory references n(Ra) indicate the address in Ra + n. When used with an update form
+of an opcode, the value in Ra is incremented by n.
 
-  Memory references (Ra+Rb) or (Ra)(Rb) indicate the address Ra + Rb, used by indexed
-  loads or stores. Both forms are accepted. When used with an update then the base register
-  is updated by the value in the index register.
+Memory references (Ra+Rb) or (Ra)(Rb) indicate the address Ra + Rb, used by indexed
+loads or stores. Both forms are accepted. When used with an update then the base register
+is updated by the value in the index register.
 
-  Examples:
-    MOVD (R3), R4		<=>	ld r4,0(r3)
-    MOVW (R3), R4		<=>	lwa r4,0(r3)
-    MOVWZU 4(R3), R4		<=>	lwzu r4,4(r3)
-    MOVWZ (R3+R5), R4		<=>	lwzx r4,r3,r5
-    MOVHZ  (R3), R4		<=>	lhz r4,0(r3)
-    MOVHU 2(R3), R4		<=>	lhau r4,2(r3)
-    MOVBZ (R3), R4		<=>	lbz r4,0(r3)
+Examples:
 
-    MOVD R4,(R3)		<=>	std r4,0(r3)
-    MOVW R4,(R3)		<=>	stw r4,0(r3)
-    MOVW R4,(R3+R5)		<=>	stwx r4,r3,r5
-    MOVWU R4,4(R3)		<=>	stwu r4,4(r3)
-    MOVH R4,2(R3)		<=>	sth r4,2(r3)
-    MOVBU R4,(R3)(R5)		<=>	stbux r4,r3,r5
+  MOVD (R3), R4		<=>	ld r4,0(r3)
+  MOVW (R3), R4		<=>	lwa r4,0(r3)
+  MOVWZU 4(R3), R4		<=>	lwzu r4,4(r3)
+  MOVWZ (R3+R5), R4		<=>	lwzx r4,r3,r5
+  MOVHZ  (R3), R4		<=>	lhz r4,0(r3)
+  MOVHU 2(R3), R4		<=>	lhau r4,2(r3)
+  MOVBZ (R3), R4		<=>	lbz r4,0(r3)
+
+  MOVD R4,(R3)		<=>	std r4,0(r3)
+  MOVW R4,(R3)		<=>	stw r4,0(r3)
+  MOVW R4,(R3+R5)		<=>	stwx r4,r3,r5
+  MOVWU R4,4(R3)		<=>	stwu r4,4(r3)
+  MOVH R4,2(R3)		<=>	sth r4,2(r3)
+  MOVBU R4,(R3)(R5)		<=>	stbux r4,r3,r5
 
 4. Compares
 
-  When an instruction does a compare or other operation that might
-  result in a condition code, then the resulting condition is set
-  in a field of the condition register. The condition register consists
-  of 8 4-bit fields named CR0 - CR7. When a compare instruction
-  identifies a CR then the resulting condition is set in that field
-  to be read by a later branch or isel instruction. Within these fields,
-  bits are set to indicate less than, greater than, or equal conditions.
+When an instruction does a compare or other operation that might
+result in a condition code, then the resulting condition is set
+in a field of the condition register. The condition register consists
+of 8 4-bit fields named CR0 - CR7. When a compare instruction
+identifies a CR then the resulting condition is set in that field
+to be read by a later branch or isel instruction. Within these fields,
+bits are set to indicate less than, greater than, or equal conditions.
+
+Once an instruction sets a condition, then a subsequent branch, isel or
+other instruction can read the condition field and operate based on the
+bit settings.
 
-  Once an instruction sets a condition, then a subsequent branch, isel or
-  other instruction can read the condition field and operate based on the
-  bit settings.
+Examples:
 
-  Examples:
-    CMP R3, R4			<=>	cmp r3, r4	(CR0 assumed)
-    CMP R3, R4, CR1		<=>	cmp cr1, r3, r4
+  CMP R3, R4			<=>	cmp r3, r4	(CR0 assumed)
+  CMP R3, R4, CR1		<=>	cmp cr1, r3, r4
 
-  Note that the condition register is the target operand of compare opcodes, so
-  the remaining operands are in the same order for Go asm and PPC64 asm.
-  When CR0 is used then it is implicit and does not need to be specified.
+Note that the condition register is the target operand of compare opcodes, so
+the remaining operands are in the same order for Go asm and PPC64 asm.
+When CR0 is used then it is implicit and does not need to be specified.
 
 5. Branches
 
-  Many branches are represented as a form of the BC instruction. There are
-  other extended opcodes to make it easier to see what type of branch is being
-  used.
+Many branches are represented as a form of the BC instruction. There are
+other extended opcodes to make it easier to see what type of branch is being
+used.
 
-  The following is a brief description of the BC instruction and its commonly
-  used operands.
+The following is a brief description of the BC instruction and its commonly
+used operands.
 
-  BC op1, op2, op3
+BC op1, op2, op3
 
-    op1: type of branch
-        16 -> bctr (branch on ctr)
-        12 -> bcr  (branch if cr bit is set)
-        8  -> bcr+bctr (branch on ctr and cr values)
+  op1: type of branch
+      16 -> bctr (branch on ctr)
+      12 -> bcr  (branch if cr bit is set)
+      8  -> bcr+bctr (branch on ctr and cr values)
 	4  -> bcr != 0 (branch if specified cr bit is not set)
 
 	There are more combinations but these are the most common.
 
-    op2: condition register field and condition bit
+  op2: condition register field and condition bit
 
 	This contains an immediate value indicating which condition field
 	to read and what bits to test. Each field is 4 bits long with CR0
-        at bit 0, CR1 at bit 4, etc. The value is computed as 4*CR+condition
-        with these condition values:
+      at bit 0, CR1 at bit 4, etc. The value is computed as 4*CR+condition
+      with these condition values:
 
-        0 -> LT
-        1 -> GT
-        2 -> EQ
-        3 -> OVG
+      0 -> LT
+      1 -> GT
+      2 -> EQ
+      3 -> OVG
 
 	Thus 0 means test CR0 for LT, 5 means CR1 for GT, 30 means CR7 for EQ.
 
-    op3: branch target
+  op3: branch target
 
-  Examples:
+Examples:
 
-    BC 12, 0, target		<=>	blt cr0, target
-    BC 12, 2, target		<=>	beq cr0, target
-    BC 12, 5, target		<=>	bgt cr1, target
-    BC 12, 30, target		<=>	beq cr7, target
-    BC 4, 6, target		<=>	bne cr1, target
-    BC 4, 1, target		<=>	ble cr1, target
+  BC 12, 0, target		<=>	blt cr0, target
+  BC 12, 2, target		<=>	beq cr0, target
+  BC 12, 5, target		<=>	bgt cr1, target
+  BC 12, 30, target		<=>	beq cr7, target
+  BC 4, 6, target		<=>	bne cr1, target
+  BC 4, 1, target		<=>	ble cr1, target
 
-    The following extended opcodes are available for ease of use and readability:
+  The following extended opcodes are available for ease of use and readability:
 
-    BNE CR2, target		<=>	bne cr2, target
-    BEQ CR4, target		<=>	beq cr4, target
-    BLT target			<=>	blt target (cr0 default)
-    BGE CR7, target		<=>	bge cr7, target
+  BNE CR2, target		<=>	bne cr2, target
+  BEQ CR4, target		<=>	beq cr4, target
+  BLT target			<=>	blt target (cr0 default)
+  BGE CR7, target		<=>	bge cr7, target
 
-  Refer to the ISA for more information on additional values for the BC instruction,
-  how to handle OVG information, and much more.
+Refer to the ISA for more information on additional values for the BC instruction,
+how to handle OVG information, and much more.
 
 5. Align directive
 
-  Starting with Go 1.12, Go asm supports the PCALIGN directive, which indicates
-  that the next instruction should be aligned to the specified value. Currently
-  8 and 16 are the only supported values, and a maximum of 2 NOPs will be added
-  to align the code. That means in the case where the code is aligned to 4 but
-  PCALIGN $16 is at that location, the code will only be aligned to 8 to avoid
-  adding 3 NOPs.
+Starting with Go 1.12, Go asm supports the PCALIGN directive, which indicates
+that the next instruction should be aligned to the specified value. Currently
+8 and 16 are the only supported values, and a maximum of 2 NOPs will be added
+to align the code. That means in the case where the code is aligned to 4 but
+PCALIGN $16 is at that location, the code will only be aligned to 8 to avoid
+adding 3 NOPs.
 
-  The purpose of this directive is to improve performance for cases like loops
-  where better alignment (8 or 16 instead of 4) might be helpful. This directive
-  exists in PPC64 assembler and is frequently used by PPC64 assembler writers.
+The purpose of this directive is to improve performance for cases like loops
+where better alignment (8 or 16 instead of 4) might be helpful. This directive
+exists in PPC64 assembler and is frequently used by PPC64 assembler writers.
 
-  PCALIGN $16
-  PCALIGN $8
+PCALIGN $16
+PCALIGN $8
 
-  Functions in Go are aligned to 16 bytes, as is the case in all other compilers
-  for PPC64.
+Functions in Go are aligned to 16 bytes, as is the case in all other compilers
+for PPC64.
 
 6. Shift instructions
 
-  The simple scalar shifts on PPC64 expect a shift count that fits in 5 bits for
-  32-bit values or 6 bit for 64-bit values. If the shift count is a constant value
-  greater than the max then the assembler sets it to the max for that size (31 for
-  32 bit values, 63 for 64 bit values). If the shift count is in a register, then
-  only the low 5 or 6 bits of the register will be used as the shift count. The
-  Go compiler will add appropriate code to compare the shift value to achieve the
-  the correct result, and the assembler does not add extra checking.
+The simple scalar shifts on PPC64 expect a shift count that fits in 5 bits for
+32-bit values or 6 bit for 64-bit values. If the shift count is a constant value
+greater than the max then the assembler sets it to the max for that size (31 for
+32 bit values, 63 for 64 bit values). If the shift count is in a register, then
+only the low 5 or 6 bits of the register will be used as the shift count. The
+Go compiler will add appropriate code to compare the shift value to achieve the
+the correct result, and the assembler does not add extra checking.
 
-  Examples:
+Examples:
 
-    SRAD $8,R3,R4		=>	sradi r4,r3,8
-    SRD $8,R3,R4		=>	rldicl r4,r3,56,8
-    SLD $8,R3,R4		=>	rldicr r4,r3,8,55
-    SRAW $16,R4,R5		=>	srawi r5,r4,16
-    SRW $40,R4,R5		=>	rlwinm r5,r4,0,0,31
-    SLW $12,R4,R5		=>	rlwinm r5,r4,12,0,19
+  SRAD $8,R3,R4		=>	sradi r4,r3,8
+  SRD $8,R3,R4		=>	rldicl r4,r3,56,8
+  SLD $8,R3,R4		=>	rldicr r4,r3,8,55
+  SRAW $16,R4,R5		=>	srawi r5,r4,16
+  SRW $40,R4,R5		=>	rlwinm r5,r4,0,0,31
+  SLW $12,R4,R5		=>	rlwinm r5,r4,12,0,19
 
-  Some non-simple shifts have operands in the Go assembly which don't map directly
-  onto operands in the PPC64 assembly. When an operand in a shift instruction in the
-  Go assembly is a bit mask, that mask is represented as a start and end bit in the
-  PPC64 assembly instead of a mask. See the ISA for more detail on these types of shifts.
-  Here are a few examples:
+Some non-simple shifts have operands in the Go assembly which don't map directly
+onto operands in the PPC64 assembly. When an operand in a shift instruction in the
+Go assembly is a bit mask, that mask is represented as a start and end bit in the
+PPC64 assembly instead of a mask. See the ISA for more detail on these types of shifts.
+Here are a few examples:
 
-    RLWMI $7,R3,$65535,R6 	=>	rlwimi r6,r3,7,16,31
-    RLDMI $0,R4,$7,R6 		=>	rldimi r6,r4,0,61
+  RLWMI $7,R3,$65535,R6 	=>	rlwimi r6,r3,7,16,31
+  RLDMI $0,R4,$7,R6 		=>	rldimi r6,r4,0,61
 
-  More recently, Go opcodes were added which map directly onto the PPC64 opcodes. It is
-  recommended to use the newer opcodes to avoid confusion.
+More recently, Go opcodes were added which map directly onto the PPC64 opcodes. It is
+recommended to use the newer opcodes to avoid confusion.
 
-    RLDICL $0,R4,$15,R6		=>	rldicl r6,r4,0,15
-    RLDICR $0,R4,$15,R6		=>	rldicr r6.r4,0,15
+  RLDICL $0,R4,$15,R6		=>	rldicl r6,r4,0,15
+  RLDICR $0,R4,$15,R6		=>	rldicr r6.r4,0,15
 
 Register naming
 
 1. Special register usage in Go asm
 
-  The following registers should not be modified by user Go assembler code.
+The following registers should not be modified by user Go assembler code.
 
   R0: Go code expects this register to contain the value 0.
   R1: Stack pointer
@@ -231,7 +236,7 @@ Register naming
   R13: TLS pointer
   R30: g (goroutine)
 
-  Register names:
+Register names:
 
   Rn is used for general purpose registers. (0-31)
   Fn is used for floating point registers. (0-31)
diff --git a/src/cmd/internal/obj/riscv/cpu.go b/src/cmd/internal/obj/riscv/cpu.go
index 8c2daf6e5b..594f8ea3fc 100644
--- a/src/cmd/internal/obj/riscv/cpu.go
+++ b/src/cmd/internal/obj/riscv/cpu.go
@@ -276,15 +276,11 @@ const (
 )
 
 // RISC-V mnemonics, as defined in the "opcodes" and "opcodes-pseudo" files
-// from:
-//
-//    https://github.com/riscv/riscv-opcodes
+// at https://github.com/riscv/riscv-opcodes.
 //
 // As well as some pseudo-mnemonics (e.g. MOV) used only in the assembler.
 //
-// See also "The RISC-V Instruction Set Manual" at:
-//
-//    https://riscv.org/specifications/
+// See also "The RISC-V Instruction Set Manual" at https://riscv.org/specifications/.
 //
 // If you modify this table, you MUST run 'go generate' to regenerate anames.go!
 const (
diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go
index 61044b0531..2c00c87aa2 100644
--- a/src/cmd/internal/obj/riscv/obj.go
+++ b/src/cmd/internal/obj/riscv/obj.go
@@ -323,9 +323,7 @@ func setPCs(p *obj.Prog, pc int64) int64 {
 // FixedFrameSize makes other packages aware of the space allocated for RA.
 //
 // A nicer version of this diagram can be found on slide 21 of the presentation
-// attached to:
-//
-//   https://golang.org/issue/16922#issuecomment-243748180
+// attached to https://golang.org/issue/16922#issuecomment-243748180.
 //
 func stackOffset(a *obj.Addr, stacksize int64) {
 	switch a.Name {
diff --git a/src/cmd/link/internal/benchmark/bench.go b/src/cmd/link/internal/benchmark/bench.go
index 6c163c801e..39179515cd 100644
--- a/src/cmd/link/internal/benchmark/bench.go
+++ b/src/cmd/link/internal/benchmark/bench.go
@@ -44,16 +44,16 @@ type mark struct {
 //
 // Typical usage should look like:
 //
-// func main() {
-//   filename := "" // Set to enable per-phase pprof file output.
-//   bench := benchmark.New(benchmark.GC, filename)
-//   defer bench.Report(os.Stdout)
-//   // etc
-//   bench.Start("foo")
-//   foo()
-//   bench.Start("bar")
-//   bar()
-// }
+//  func main() {
+//    filename := "" // Set to enable per-phase pprof file output.
+//    bench := benchmark.New(benchmark.GC, filename)
+//    defer bench.Report(os.Stdout)
+//    // etc
+//    bench.Start("foo")
+//    foo()
+//    bench.Start("bar")
+//    bar()
+//  }
 //
 // Note that a nil Metrics object won't cause any errors, so one could write
 // code like:
diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go
index 08de21cab6..733f4ec00b 100644
--- a/src/cmd/link/internal/ld/elf.go
+++ b/src/cmd/link/internal/ld/elf.go
@@ -549,30 +549,31 @@ func elfMipsAbiFlags(sh *ElfShdr, startva uint64, resoff uint64) int {
 	return n
 }
 
-//typedef struct
-//{
-//  /* Version of flags structure.  */
-//  uint16_t version;
-//  /* The level of the ISA: 1-5, 32, 64.  */
-//  uint8_t isa_level;
-//  /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise.  */
-//  uint8_t isa_rev;
-//  /* The size of general purpose registers.  */
-//  uint8_t gpr_size;
-//  /* The size of co-processor 1 registers.  */
-//  uint8_t cpr1_size;
-//  /* The size of co-processor 2 registers.  */
-//  uint8_t cpr2_size;
-//  /* The floating-point ABI.  */
-//  uint8_t fp_abi;
-//  /* Processor-specific extension.  */
-//  uint32_t isa_ext;
-//  /* Mask of ASEs used.  */
-//  uint32_t ases;
-//  /* Mask of general flags.  */
-//  uint32_t flags1;
-//  uint32_t flags2;
-//} Elf_Internal_ABIFlags_v0;
+// Layout is given by this C definition:
+//  typedef struct
+//  {
+//    /* Version of flags structure.  */
+//    uint16_t version;
+//    /* The level of the ISA: 1-5, 32, 64.  */
+//    uint8_t isa_level;
+//    /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise.  */
+//    uint8_t isa_rev;
+//    /* The size of general purpose registers.  */
+//    uint8_t gpr_size;
+//    /* The size of co-processor 1 registers.  */
+//    uint8_t cpr1_size;
+//    /* The size of co-processor 2 registers.  */
+//    uint8_t cpr2_size;
+//    /* The floating-point ABI.  */
+//    uint8_t fp_abi;
+//    /* Processor-specific extension.  */
+//    uint32_t isa_ext;
+//    /* Mask of ASEs used.  */
+//    uint32_t ases;
+//    /* Mask of general flags.  */
+//    uint32_t flags1;
+//    uint32_t flags2;
+//  } Elf_Internal_ABIFlags_v0;
 func elfWriteMipsAbiFlags(ctxt *Link) int {
 	sh := elfshname(".MIPS.abiflags")
 	ctxt.Out.SeekSet(int64(sh.Off))
diff --git a/src/cmd/link/internal/ld/outbuf.go b/src/cmd/link/internal/ld/outbuf.go
index 1d21dce9c5..1d1751ccdc 100644
--- a/src/cmd/link/internal/ld/outbuf.go
+++ b/src/cmd/link/internal/ld/outbuf.go
@@ -30,12 +30,12 @@ const outbufMode = 0775
 // any system calls to read the value.
 //
 // Third, it also mmaps the output file (if available). The intended usage is:
-// - Mmap the output file
-// - Write the content
-// - possibly apply any edits in the output buffer
-// - possibly write more content to the file. These writes take place in a heap
-//   backed buffer that will get synced to disk.
-// - Munmap the output file
+//  - Mmap the output file
+//  - Write the content
+//  - possibly apply any edits in the output buffer
+//  - possibly write more content to the file. These writes take place in a heap
+//    backed buffer that will get synced to disk.
+//  - Munmap the output file
 //
 // And finally, it provides a mechanism by which you can multithread the
 // writing of output files. This mechanism is accomplished by copying a OutBuf,
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index d46aa41181..d102bb35ce 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -166,21 +166,21 @@ type symAndSize struct {
 //
 // Notes on the layout of global symbol index space:
 //
-// - Go object files are read before host object files; each Go object
-//   read adds its defined package symbols to the global index space.
-//   Nonpackage symbols are not yet added.
+//  - Go object files are read before host object files; each Go object
+//    read adds its defined package symbols to the global index space.
+//    Nonpackage symbols are not yet added.
 //
-// - In loader.LoadNonpkgSyms, add non-package defined symbols and
-//   references in all object files to the global index space.
+//  - In loader.LoadNonpkgSyms, add non-package defined symbols and
+//    references in all object files to the global index space.
 //
-// - Host object file loading happens; the host object loader does a
-//   name/version lookup for each symbol it finds; this can wind up
-//   extending the external symbol index space range. The host object
-//   loader stores symbol payloads in loader.payloads using SymbolBuilder.
+//  - Host object file loading happens; the host object loader does a
+//    name/version lookup for each symbol it finds; this can wind up
+//    extending the external symbol index space range. The host object
+//    loader stores symbol payloads in loader.payloads using SymbolBuilder.
 //
-// - Each symbol gets a unique global index. For duplicated and
-//   overwriting/overwritten symbols, the second (or later) appearance
-//   of the symbol gets the same global index as the first appearance.
+//  - Each symbol gets a unique global index. For duplicated and
+//    overwriting/overwritten symbols, the second (or later) appearance
+//    of the symbol gets the same global index as the first appearance.
 type Loader struct {
 	start       map[*oReader]Sym // map from object file to its start index
 	objs        []objIdx         // sorted by start index (i.e. objIdx.i)
diff --git a/src/cmd/link/internal/s390x/asm.go b/src/cmd/link/internal/s390x/asm.go
index 1952971dcb..f26b3f3cf2 100644
--- a/src/cmd/link/internal/s390x/asm.go
+++ b/src/cmd/link/internal/s390x/asm.go
@@ -43,10 +43,10 @@ import (
 // moduledata linked list at initialization time. This is only done if the runtime
 // is in a different module.
 //
-// :
-// 	larl  %r2, 
-// 	jg    
-//	undef
+//	:
+//		larl  %r2, 
+//		jg    
+//		undef
 //
 // The job of appending the moduledata is delegated to runtime.addmoduledata.
 func gentext(ctxt *ld.Link, ldr *loader.Loader) {
diff --git a/src/compress/flate/huffman_code.go b/src/compress/flate/huffman_code.go
index 891537ed5e..07b7827e1a 100644
--- a/src/compress/flate/huffman_code.go
+++ b/src/compress/flate/huffman_code.go
@@ -118,19 +118,20 @@ func (h *huffmanEncoder) bitLength(freq []int32) int {
 
 const maxBitsLimit = 16
 
-// Return the number of literals assigned to each bit size in the Huffman encoding
-//
-// This method is only called when list.length >= 3
+// bitCounts computes the number of literals assigned to each bit size in the Huffman encoding.
+// It is only called when list.length >= 3.
 // The cases of 0, 1, and 2 literals are handled by special case code.
 //
-// list  An array of the literals with non-zero frequencies
-//             and their associated frequencies. The array is in order of increasing
-//             frequency, and has as its last element a special element with frequency
-//             MaxInt32
-// maxBits     The maximum number of bits that should be used to encode any literal.
-//             Must be less than 16.
-// return      An integer array in which array[i] indicates the number of literals
-//             that should be encoded in i bits.
+// list is an array of the literals with non-zero frequencies
+// and their associated frequencies. The array is in order of increasing
+// frequency and has as its last element a special element with frequency
+// MaxInt32.
+//
+// maxBits is the maximum number of bits that should be used to encode any literal.
+// It must be less than 16.
+//
+// bitCounts retruns an integer slice in which slice[i] indicates the number of literals
+// that should be encoded in i bits.
 func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
 	if maxBits >= maxBitsLimit {
 		panic("flate: maxBits too large")
@@ -269,7 +270,7 @@ func (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalN
 
 // Update this Huffman Code object to be the minimum code for the specified frequency count.
 //
-// freq  An array of frequencies, in which frequency[i] gives the frequency of literal i.
+// freq is an array of frequencies, in which freq[i] gives the frequency of literal i.
 // maxBits  The maximum number of bits to use for any literal.
 func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
 	if h.freqcache == nil {
diff --git a/src/crypto/cipher/gcm.go b/src/crypto/cipher/gcm.go
index ba0af84a9d..47078ce594 100644
--- a/src/crypto/cipher/gcm.go
+++ b/src/crypto/cipher/gcm.go
@@ -13,7 +13,7 @@ import (
 
 // AEAD is a cipher mode providing authenticated encryption with associated
 // data. For a description of the methodology, see
-//	https://en.wikipedia.org/wiki/Authenticated_encryption
+// https://en.wikipedia.org/wiki/Authenticated_encryption.
 type AEAD interface {
 	// NonceSize returns the size of the nonce that must be passed to Seal
 	// and Open.
diff --git a/src/crypto/elliptic/p256.go b/src/crypto/elliptic/p256.go
index 99c39ea9d5..fcff1d3d39 100644
--- a/src/crypto/elliptic/p256.go
+++ b/src/crypto/elliptic/p256.go
@@ -282,7 +282,8 @@ var p256Zero31 = [p256Limbs]uint32{two31m3, two30m2, two31m2, two30p13m2, two31m
 // p256Diff sets out = in-in2.
 //
 // On entry: in[0,2,...] < 2**30, in[1,3,...] < 2**29 and
-//           in2[0,2,...] < 2**30, in2[1,3,...] < 2**29.
+// in2[0,2,...] < 2**30, in2[1,3,...] < 2**29.
+//
 // On exit: out[0,2,...] < 2**30, out[1,3,...] < 2**29.
 func p256Diff(out, in, in2 *[p256Limbs]uint32) {
 	var carry uint32
diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go
index 837c42a3db..584456c343 100644
--- a/src/crypto/x509/x509.go
+++ b/src/crypto/x509/x509.go
@@ -244,59 +244,56 @@ func (algo PublicKeyAlgorithm) String() string {
 
 // OIDs for signature algorithms
 //
-// pkcs-1 OBJECT IDENTIFIER ::= {
-//    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
+//	pkcs-1 OBJECT IDENTIFIER ::= {
+//		iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
 //
 //
 // RFC 3279 2.2.1 RSA Signature Algorithms
 //
-// md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
+//	md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
 //
-// md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
+//	md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
 //
-// sha-1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
+//	sha-1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
 //
-// dsaWithSha1 OBJECT IDENTIFIER ::= {
-//    iso(1) member-body(2) us(840) x9-57(10040) x9cm(4) 3 }
+//	dsaWithSha1 OBJECT IDENTIFIER ::= {
+//		iso(1) member-body(2) us(840) x9-57(10040) x9cm(4) 3 }
 //
 // RFC 3279 2.2.3 ECDSA Signature Algorithm
 //
-// ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
-// 	  iso(1) member-body(2) us(840) ansi-x962(10045)
-//    signatures(4) ecdsa-with-SHA1(1)}
-//
+//	ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
+//		iso(1) member-body(2) us(840) ansi-x962(10045)
+//		signatures(4) ecdsa-with-SHA1(1)}
 //
 // RFC 4055 5 PKCS #1 Version 1.5
 //
-// sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
+//	sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
 //
-// sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
+//	sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
 //
-// sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
+//	sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
 //
 //
 // RFC 5758 3.1 DSA Signature Algorithms
 //
-// dsaWithSha256 OBJECT IDENTIFIER ::= {
-//    joint-iso-ccitt(2) country(16) us(840) organization(1) gov(101)
-//    csor(3) algorithms(4) id-dsa-with-sha2(3) 2}
+//	dsaWithSha256 OBJECT IDENTIFIER ::= {
+//		joint-iso-ccitt(2) country(16) us(840) organization(1) gov(101)
+//		csor(3) algorithms(4) id-dsa-with-sha2(3) 2}
 //
 // RFC 5758 3.2 ECDSA Signature Algorithm
 //
-// ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
-//    us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
-//
-// ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
-//    us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
+//	ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+//		us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
 //
-// ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
-//    us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
+//	ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+//		us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
 //
+//	ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+//		us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
 //
 // RFC 8410 3 Curve25519 and Curve448 Algorithm Identifiers
 //
-// id-Ed25519   OBJECT IDENTIFIER ::= { 1 3 101 112 }
-
+//	id-Ed25519   OBJECT IDENTIFIER ::= { 1 3 101 112 }
 var (
 	oidSignatureMD2WithRSA      = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 2}
 	oidSignatureMD5WithRSA      = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4}
@@ -434,18 +431,18 @@ func getSignatureAlgorithmFromAI(ai pkix.AlgorithmIdentifier) SignatureAlgorithm
 
 // RFC 3279, 2.3 Public Key Algorithms
 //
-// pkcs-1 OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)
-//    rsadsi(113549) pkcs(1) 1 }
+//	pkcs-1 OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)
+//		rsadsi(113549) pkcs(1) 1 }
 //
 // rsaEncryption OBJECT IDENTIFIER ::== { pkcs1-1 1 }
 //
-// id-dsa OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)
-//    x9-57(10040) x9cm(4) 1 }
+//	id-dsa OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)
+//		x9-57(10040) x9cm(4) 1 }
 //
 // RFC 5480, 2.1.1 Unrestricted Algorithm Identifier and Parameters
 //
-// id-ecPublicKey OBJECT IDENTIFIER ::= {
-//       iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }
+//	id-ecPublicKey OBJECT IDENTIFIER ::= {
+//		iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }
 var (
 	oidPublicKeyRSA     = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1}
 	oidPublicKeyDSA     = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 1}
@@ -469,18 +466,18 @@ func getPublicKeyAlgorithmFromOID(oid asn1.ObjectIdentifier) PublicKeyAlgorithm
 
 // RFC 5480, 2.1.1.1. Named Curve
 //
-// secp224r1 OBJECT IDENTIFIER ::= {
-//   iso(1) identified-organization(3) certicom(132) curve(0) 33 }
+//  secp224r1 OBJECT IDENTIFIER ::= {
+//    iso(1) identified-organization(3) certicom(132) curve(0) 33 }
 //
-// secp256r1 OBJECT IDENTIFIER ::= {
-//   iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
-//   prime(1) 7 }
+//  secp256r1 OBJECT IDENTIFIER ::= {
+//    iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
+//    prime(1) 7 }
 //
-// secp384r1 OBJECT IDENTIFIER ::= {
-//   iso(1) identified-organization(3) certicom(132) curve(0) 34 }
+//  secp384r1 OBJECT IDENTIFIER ::= {
+//    iso(1) identified-organization(3) certicom(132) curve(0) 34 }
 //
-// secp521r1 OBJECT IDENTIFIER ::= {
-//   iso(1) identified-organization(3) certicom(132) curve(0) 35 }
+//  secp521r1 OBJECT IDENTIFIER ::= {
+//    iso(1) identified-organization(3) certicom(132) curve(0) 35 }
 //
 // NB: secp256r1 is equivalent to prime256v1
 var (
@@ -537,16 +534,16 @@ const (
 
 // RFC 5280, 4.2.1.12  Extended Key Usage
 //
-// anyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-ce-extKeyUsage 0 }
+//	anyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-ce-extKeyUsage 0 }
 //
-// id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
+//	id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
 //
-// id-kp-serverAuth             OBJECT IDENTIFIER ::= { id-kp 1 }
-// id-kp-clientAuth             OBJECT IDENTIFIER ::= { id-kp 2 }
-// id-kp-codeSigning            OBJECT IDENTIFIER ::= { id-kp 3 }
-// id-kp-emailProtection        OBJECT IDENTIFIER ::= { id-kp 4 }
-// id-kp-timeStamping           OBJECT IDENTIFIER ::= { id-kp 8 }
-// id-kp-OCSPSigning            OBJECT IDENTIFIER ::= { id-kp 9 }
+//	id-kp-serverAuth             OBJECT IDENTIFIER ::= { id-kp 1 }
+//	id-kp-clientAuth             OBJECT IDENTIFIER ::= { id-kp 2 }
+//	id-kp-codeSigning            OBJECT IDENTIFIER ::= { id-kp 3 }
+//	id-kp-emailProtection        OBJECT IDENTIFIER ::= { id-kp 4 }
+//	id-kp-timeStamping           OBJECT IDENTIFIER ::= { id-kp 8 }
+//	id-kp-OCSPSigning            OBJECT IDENTIFIER ::= { id-kp 9 }
 var (
 	oidExtKeyUsageAny                            = asn1.ObjectIdentifier{2, 5, 29, 37, 0}
 	oidExtKeyUsageServerAuth                     = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 1}
diff --git a/src/database/sql/fakedb_test.go b/src/database/sql/fakedb_test.go
index d1edcb8c48..c3b9d1ce46 100644
--- a/src/database/sql/fakedb_test.go
+++ b/src/database/sql/fakedb_test.go
@@ -510,7 +510,7 @@ func errf(msg string, args ...any) error {
 
 // parts are table|selectCol1,selectCol2|whereCol=?,whereCol2=?
 // (note that where columns must always contain ? marks,
-//  just a limitation for fakedb)
+// just a limitation for fakedb)
 func (c *fakeConn) prepareSelect(stmt *fakeStmt, parts []string) (*fakeStmt, error) {
 	if len(parts) != 3 {
 		stmt.Close()
diff --git a/src/debug/gosym/pclntab_test.go b/src/debug/gosym/pclntab_test.go
index d690a1e3f2..04b5fcc283 100644
--- a/src/debug/gosym/pclntab_test.go
+++ b/src/debug/gosym/pclntab_test.go
@@ -271,13 +271,12 @@ func TestPCLine(t *testing.T) {
 // read115Executable returns a hello world executable compiled by Go 1.15.
 //
 // The file was compiled in /tmp/hello.go:
-// [BEGIN]
-// package main
 //
-// func main() {
-//    println("hello")
-// }
-// [END]
+//	package main
+//
+//	func main() {
+//		println("hello")
+//	}
 func read115Executable(tb testing.TB) []byte {
 	zippedDat, err := os.ReadFile("testdata/pcln115.gz")
 	if err != nil {
diff --git a/src/fmt/doc.go b/src/fmt/doc.go
index 6b49deda87..4151b39ea6 100644
--- a/src/fmt/doc.go
+++ b/src/fmt/doc.go
@@ -115,10 +115,11 @@ with %q, invalid Unicode code points are changed to the Unicode replacement
 character, U+FFFD, as in strconv.QuoteRune.
 
 Other flags:
-	+	always print a sign for numeric values;
+
+	'+'	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 0b for binary (%#b), 0 for octal (%#o),
+	'-'	pad with spaces on the right rather than the left (left-justify the field)
+	'#'	alternate format: add leading 0b for binary (%#b), 0 for octal (%#o),
 		0x or 0X for hex (%#x or %#X); suppress 0x for %p (%#p);
 		for %q, print a raw (backquoted) string if strconv.CanBackquote
 		returns true;
@@ -127,7 +128,7 @@ Other flags:
 		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;
+	'0'	pad with leading zeros rather than spaces;
 		for numbers, this moves the padding after the sign;
 		ignored for strings, byte slices and byte arrays
 
diff --git a/src/go/doc/comment.go b/src/go/doc/comment.go
index a93c05fbb7..f1aa69d974 100644
--- a/src/go/doc/comment.go
+++ b/src/go/doc/comment.go
@@ -28,8 +28,11 @@ var (
 	unicodeQuoteReplacer = strings.NewReplacer("``", ulquo, "''", urquo)
 )
 
-// Escape comment text for HTML. If nice is set,
-// also turn `` into “ and '' into ”.
+// Escape comment text for HTML. If nice is set, also replace:
+//
+//	`` -> “
+//	'' -> ”
+//
 func commentEscape(w io.Writer, text string, nice bool) {
 	if nice {
 		// In the first pass, we convert `` and '' into their unicode equivalents.
@@ -93,8 +96,10 @@ var (
 // into a link). Go identifiers that appear in the words map are italicized; if
 // the corresponding map value is not the empty string, it is considered a URL
 // and the word is converted into a link. If nice is set, the remaining text's
-// appearance is improved where it makes sense (e.g., `` is turned into “
-// and '' into ”).
+// appearance is improved where it makes sense, such as replacing:
+//
+//	`` -> “
+//	'' -> ”
 func emphasize(w io.Writer, line string, words map[string]string, nice bool) {
 	for {
 		m := matchRx.FindStringSubmatchIndex(line)
diff --git a/src/go/types/object.go b/src/go/types/object.go
index fb377002aa..8975fc93dc 100644
--- a/src/go/types/object.go
+++ b/src/go/types/object.go
@@ -297,7 +297,7 @@ func NewParam(pos token.Pos, pkg *Package, name string, typ Type) *Var {
 
 // NewField returns a new variable representing a struct field.
 // For embedded fields, the name is the unqualified type name
-/// under which the field is accessible.
+// under which the field is accessible.
 func NewField(pos token.Pos, pkg *Package, name string, typ Type, embedded bool) *Var {
 	return &Var{object: object{nil, pos, pkg, name, typ, 0, colorFor(typ), token.NoPos}, embedded: embedded, isField: true}
 }
diff --git a/src/math/big/nat.go b/src/math/big/nat.go
index 512b2c229f..31e1ad8fcf 100644
--- a/src/math/big/nat.go
+++ b/src/math/big/nat.go
@@ -363,10 +363,11 @@ func karatsuba(z, x, y nat) {
 }
 
 // alias reports whether x and y share the same base array.
+//
 // Note: alias assumes that the capacity of underlying arrays
-//       is never changed for nat values; i.e. that there are
-//       no 3-operand slice expressions in this code (or worse,
-//       reflect-based operations to the same effect).
+// is never changed for nat values; i.e. that there are
+// no 3-operand slice expressions in this code (or worse,
+// reflect-based operations to the same effect).
 func alias(x, y nat) bool {
 	return cap(x) > 0 && cap(y) > 0 && &x[0:cap(x)][cap(x)-1] == &y[0:cap(y)][cap(y)-1]
 }
diff --git a/src/net/cgo_unix.go b/src/net/cgo_unix.go
index 18e1ba1ce9..b156b198ee 100644
--- a/src/net/cgo_unix.go
+++ b/src/net/cgo_unix.go
@@ -250,12 +250,12 @@ func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error,
 
 // These are roughly enough for the following:
 //
-// Source		Encoding			Maximum length of single name entry
-// Unicast DNS		ASCII or			<=253 + a NUL terminator
-//			Unicode in RFC 5892		252 * total number of labels + delimiters + a NUL terminator
-// Multicast DNS	UTF-8 in RFC 5198 or		<=253 + a NUL terminator
-//			the same as unicast DNS ASCII	<=253 + a NUL terminator
-// Local database	various				depends on implementation
+//  Source		Encoding			Maximum length of single name entry
+//  Unicast DNS		ASCII or			<=253 + a NUL terminator
+// 			Unicode in RFC 5892		252 * total number of labels + delimiters + a NUL terminator
+//  Multicast DNS	UTF-8 in RFC 5198 or		<=253 + a NUL terminator
+// 			the same as unicast DNS ASCII	<=253 + a NUL terminator
+//  Local database	various				depends on implementation
 const (
 	nameinfoLen    = 64
 	maxNameinfoLen = 4096
diff --git a/src/net/http/client.go b/src/net/http/client.go
index 5fd184bcb1..465ee0b723 100644
--- a/src/net/http/client.go
+++ b/src/net/http/client.go
@@ -942,9 +942,9 @@ func (c *Client) CloseIdleConnections() {
 }
 
 // cancelTimerBody is an io.ReadCloser that wraps rc with two features:
-// 1) On Read error or close, the stop func is called.
-// 2) On Read failure, if reqDidTimeout is true, the error is wrapped and
-//    marked as net.Error that hit its timeout.
+//  1) On Read error or close, the stop func is called.
+//  2) On Read failure, if reqDidTimeout is true, the error is wrapped and
+//     marked as net.Error that hit its timeout.
 type cancelTimerBody struct {
 	stop          func() // stops the time.Timer waiting to cancel the request
 	rc            io.ReadCloser
diff --git a/src/net/http/cookie.go b/src/net/http/cookie.go
index cb37f2351f..6e1035330b 100644
--- a/src/net/http/cookie.go
+++ b/src/net/http/cookie.go
@@ -387,11 +387,11 @@ func sanitizeCookieName(n string) string {
 
 // sanitizeCookieValue produces a suitable cookie-value from v.
 // https://tools.ietf.org/html/rfc6265#section-4.1.1
-// cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
-// cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
-//           ; US-ASCII characters excluding CTLs,
-//           ; whitespace DQUOTE, comma, semicolon,
-//           ; and backslash
+//  cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
+//  cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
+//            ; US-ASCII characters excluding CTLs,
+//            ; whitespace DQUOTE, comma, semicolon,
+//            ; and backslash
 // We loosen this as spaces and commas are common in cookie values
 // but we produce a quoted cookie-value if and only if v contains
 // commas or spaces.
diff --git a/src/net/http/server.go b/src/net/http/server.go
index ffb742ba4a..b91069f9a1 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -1551,14 +1551,14 @@ func (w *response) bodyAllowed() bool {
 //
 // The Writers are wired together like:
 //
-// 1. *response (the ResponseWriter) ->
-// 2. (*response).w, a *bufio.Writer of bufferBeforeChunkingSize bytes ->
-// 3. chunkWriter.Writer (whose writeHeader finalizes Content-Length/Type)
-//    and which writes the chunk headers, if needed ->
-// 4. conn.bufw, a *bufio.Writer of default (4kB) bytes, writing to ->
-// 5. checkConnErrorWriter{c}, which notes any non-nil error on Write
-//    and populates c.werr with it if so, but otherwise writes to ->
-// 6. the rwc, the net.Conn.
+//  1. *response (the ResponseWriter) ->
+//  2. (*response).w, a *bufio.Writer of bufferBeforeChunkingSize bytes ->
+//  3. chunkWriter.Writer (whose writeHeader finalizes Content-Length/Type)
+//     and which writes the chunk headers, if needed ->
+//  4. conn.bufw, a *bufio.Writer of default (4kB) bytes, writing to ->
+//  5. checkConnErrorWriter{c}, which notes any non-nil error on Write
+//     and populates c.werr with it if so, but otherwise writes to ->
+//  6. the rwc, the net.Conn.
 //
 // TODO(bradfitz): short-circuit some of the buffering when the
 // initial header contains both a Content-Type and Content-Length.
diff --git a/src/net/smtp/smtp_test.go b/src/net/smtp/smtp_test.go
index 0f758f4a33..f23fd79234 100644
--- a/src/net/smtp/smtp_test.go
+++ b/src/net/smtp/smtp_test.go
@@ -1104,8 +1104,9 @@ func sendMail(hostPort string) error {
 }
 
 // localhostCert is a PEM-encoded TLS cert generated from src/crypto/tls:
-// go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com \
-// 		--ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
+//
+//	go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com \
+//		--ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
 var localhostCert = []byte(`
 -----BEGIN CERTIFICATE-----
 MIICFDCCAX2gAwIBAgIRAK0xjnaPuNDSreeXb+z+0u4wDQYJKoZIhvcNAQELBQAw
diff --git a/src/os/file_windows.go b/src/os/file_windows.go
index 378e2b1c7d..75b4707eaf 100644
--- a/src/os/file_windows.go
+++ b/src/os/file_windows.go
@@ -401,7 +401,7 @@ func openSymlink(path string) (syscall.Handle, error) {
 // normaliseLinkPath converts absolute paths returned by
 // DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, ...)
 // into paths acceptable by all Windows APIs.
-// For example, it coverts
+// For example, it converts
 //  \??\C:\foo\bar into C:\foo\bar
 //  \??\UNC\foo\bar into \\foo\bar
 //  \??\Volume{abc}\ into C:\
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index 3cdb5dce11..16fec26aeb 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -594,10 +594,10 @@ func chanrecv(c *hchan, ep unsafe.Pointer, block bool) (selected, received bool)
 
 // recv processes a receive operation on a full channel c.
 // There are 2 parts:
-// 1) The value sent by the sender sg is put into the channel
-//    and the sender is woken up to go on its merry way.
-// 2) The value received by the receiver (the current G) is
-//    written to ep.
+//  1) The value sent by the sender sg is put into the channel
+//     and the sender is woken up to go on its merry way.
+//  2) The value received by the receiver (the current G) is
+//     written to ep.
 // For synchronous channels, both values are the same.
 // For asynchronous channels, the receiver gets its data from
 // the channel buffer and the sender's data is put in the
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go
index ecbd0a3a49..d2a63d0938 100644
--- a/src/runtime/mheap.go
+++ b/src/runtime/mheap.go
@@ -319,16 +319,16 @@ type arenaHint struct {
 // mSpanManual, or mSpanFree. Transitions between these states are
 // constrained as follows:
 //
-// * A span may transition from free to in-use or manual during any GC
-//   phase.
+//  * A span may transition from free to in-use or manual during any GC
+//    phase.
 //
-// * During sweeping (gcphase == _GCoff), a span may transition from
-//   in-use to free (as a result of sweeping) or manual to free (as a
-//   result of stacks being freed).
+//  * During sweeping (gcphase == _GCoff), a span may transition from
+//    in-use to free (as a result of sweeping) or manual to free (as a
+//    result of stacks being freed).
 //
-// * During GC (gcphase != _GCoff), a span *must not* transition from
-//   manual or in-use to free. Because concurrent GC may read a pointer
-//   and then look up its span, the span state must be monotonic.
+//  * During GC (gcphase != _GCoff), a span *must not* transition from
+//    manual or in-use to free. Because concurrent GC may read a pointer
+//    and then look up its span, the span state must be monotonic.
 //
 // Setting mspan.state to mSpanInUse or mSpanManual must be done
 // atomically and only after all other span fields are valid.
@@ -1706,7 +1706,7 @@ func spanHasNoSpecials(s *mspan) {
 // offset & next, which this routine will fill in.
 // Returns true if the special was successfully added, false otherwise.
 // (The add will fail only if a record with the same p and s->kind
-//  already exists.)
+// already exists.)
 func addspecial(p unsafe.Pointer, s *special) bool {
 	span := spanOfHeap(uintptr(p))
 	if span == nil {
diff --git a/src/runtime/netpoll.go b/src/runtime/netpoll.go
index c6acc2328a..864148b715 100644
--- a/src/runtime/netpoll.go
+++ b/src/runtime/netpoll.go
@@ -47,16 +47,16 @@ const (
 
 // pollDesc contains 2 binary semaphores, rg and wg, to park reader and writer
 // goroutines respectively. The semaphore can be in the following states:
-// pdReady - io readiness notification is pending;
-//           a goroutine consumes the notification by changing the state to nil.
-// pdWait - a goroutine prepares to park on the semaphore, but not yet parked;
-//          the goroutine commits to park by changing the state to G pointer,
-//          or, alternatively, concurrent io notification changes the state to pdReady,
-//          or, alternatively, concurrent timeout/close changes the state to nil.
-// G pointer - the goroutine is blocked on the semaphore;
-//             io notification or timeout/close changes the state to pdReady or nil respectively
-//             and unparks the goroutine.
-// nil - none of the above.
+//  pdReady - io readiness notification is pending;
+//            a goroutine consumes the notification by changing the state to nil.
+//  pdWait - a goroutine prepares to park on the semaphore, but not yet parked;
+//           the goroutine commits to park by changing the state to G pointer,
+//           or, alternatively, concurrent io notification changes the state to pdReady,
+//           or, alternatively, concurrent timeout/close changes the state to nil.
+//  G pointer - the goroutine is blocked on the semaphore;
+//              io notification or timeout/close changes the state to pdReady or nil respectively
+//              and unparks the goroutine.
+//  nil - none of the above.
 const (
 	pdReady uintptr = 1
 	pdWait  uintptr = 2
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index df16e0f9b6..f9f82f3867 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -5575,11 +5575,11 @@ func (p pMask) clear(id int32) {
 //
 // Thus, we get the following effects on timer-stealing in findrunnable:
 //
-// * Idle Ps with no timers when they go idle are never checked in findrunnable
-//   (for work- or timer-stealing; this is the ideal case).
-// * Running Ps must always be checked.
-// * Idle Ps whose timers are stolen must continue to be checked until they run
-//   again, even after timer expiration.
+//  * Idle Ps with no timers when they go idle are never checked in findrunnable
+//    (for work- or timer-stealing; this is the ideal case).
+//  * Running Ps must always be checked.
+//  * Idle Ps whose timers are stolen must continue to be checked until they run
+//    again, even after timer expiration.
 //
 // When the P starts running again, the mask should be set, as a timer may be
 // added at any time.
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 1fb9e195e5..dc18bf927e 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -291,10 +291,10 @@ func (pp *puintptr) set(p *p) { *pp = puintptr(unsafe.Pointer(p)) }
 // Because we do free Ms, there are some additional constrains on
 // muintptrs:
 //
-// 1. Never hold an muintptr locally across a safe point.
+//  1. Never hold an muintptr locally across a safe point.
 //
-// 2. Any muintptr in the heap must be owned by the M itself so it can
-//    ensure it is not in use when the last true *m is released.
+//  2. Any muintptr in the heap must be owned by the M itself so it can
+//     ensure it is not in use when the last true *m is released.
 type muintptr uintptr
 
 //go:nosplit
diff --git a/src/runtime/string.go b/src/runtime/string.go
index 980a9866e6..eec29075b9 100644
--- a/src/runtime/string.go
+++ b/src/runtime/string.go
@@ -147,10 +147,10 @@ func rawstringtmp(buf *tmpBuf, l int) (s string, b []byte) {
 // and otherwise intrinsified by the compiler.
 //
 // Some internal compiler optimizations use this function.
-// - Used for m[T1{... Tn{..., string(k), ...} ...}] and m[string(k)]
-//   where k is []byte, T1 to Tn is a nesting of struct and array literals.
-// - Used for "<"+string(b)+">" concatenation where b is []byte.
-// - Used for string(b)=="foo" comparison where b is []byte.
+//  - Used for m[T1{... Tn{..., string(k), ...} ...}] and m[string(k)]
+//    where k is []byte, T1 to Tn is a nesting of struct and array literals.
+//  - Used for "<"+string(b)+">" concatenation where b is []byte.
+//  - Used for string(b)=="foo" comparison where b is []byte.
 func slicebytetostringtmp(ptr *byte, n int) (str string) {
 	if raceenabled && n > 0 {
 		racereadrangepc(unsafe.Pointer(ptr),
diff --git a/src/runtime/symtab_test.go b/src/runtime/symtab_test.go
index 99ff0d4420..a83afc3385 100644
--- a/src/runtime/symtab_test.go
+++ b/src/runtime/symtab_test.go
@@ -205,15 +205,15 @@ func tracebackFunc(t *testing.T) uintptr {
 // Go obviously doesn't easily expose the problematic PCs to running programs,
 // so this test is a bit fragile. Some details:
 //
-// * tracebackFunc is our target function. We want to get a PC in the
-//   alignment region following this function. This function also has other
-//   functions inlined into it to ensure it has an InlTree (this was the source
-//   of the bug in issue 44971).
+//  * tracebackFunc is our target function. We want to get a PC in the
+//    alignment region following this function. This function also has other
+//    functions inlined into it to ensure it has an InlTree (this was the source
+//    of the bug in issue 44971).
 //
-// * We acquire a PC in tracebackFunc, walking forwards until FuncForPC says
-//   we're in a new function. The last PC of the function according to FuncForPC
-//   should be in the alignment region (assuming the function isn't already
-//   perfectly aligned).
+//  * We acquire a PC in tracebackFunc, walking forwards until FuncForPC says
+//    we're in a new function. The last PC of the function according to FuncForPC
+//    should be in the alignment region (assuming the function isn't already
+//    perfectly aligned).
 //
 // This is a regression test for issue 44971.
 func TestFunctionAlignmentTraceback(t *testing.T) {
diff --git a/src/runtime/type.go b/src/runtime/type.go
index da47147897..a00394f3b3 100644
--- a/src/runtime/type.go
+++ b/src/runtime/type.go
@@ -17,7 +17,7 @@ import (
 //	cmd/compile/internal/reflectdata/reflect.go
 //	cmd/link/internal/ld/decodesym.go
 //	reflect/type.go
-//      internal/reflectlite/type.go
+//	internal/reflectlite/type.go
 type tflag uint8
 
 const (
diff --git a/src/syscall/exec_windows.go b/src/syscall/exec_windows.go
index 9d10d6a512..41e58d4355 100644
--- a/src/syscall/exec_windows.go
+++ b/src/syscall/exec_windows.go
@@ -19,11 +19,11 @@ var ForkLock sync.RWMutex
 // in https://msdn.microsoft.com/en-us/library/ms880421.
 // This function returns "" (2 double quotes) if s is empty.
 // Alternatively, these transformations are done:
-// - every back slash (\) is doubled, but only if immediately
-//   followed by double quote (");
-// - every double quote (") is escaped by back slash (\);
-// - finally, s is wrapped with double quotes (arg -> "arg"),
-//   but only if there is space or tab inside s.
+//  - every back slash (\) is doubled, but only if immediately
+//    followed by double quote (");
+//  - every double quote (") is escaped by back slash (\);
+//  - finally, s is wrapped with double quotes (arg -> "arg"),
+//    but only if there is space or tab inside s.
 func EscapeArg(s string) string {
 	if len(s) == 0 {
 		return `""`
diff --git a/src/time/zoneinfo.go b/src/time/zoneinfo.go
index b460b9e6c5..9bcb183d77 100644
--- a/src/time/zoneinfo.go
+++ b/src/time/zoneinfo.go
@@ -197,14 +197,14 @@ func (l *Location) lookup(sec int64) (name string, offset int, start, end int64,
 // The reference implementation in localtime.c from
 // https://www.iana.org/time-zones/repository/releases/tzcode2013g.tar.gz
 // implements the following algorithm for these cases:
-// 1) If the first zone is unused by the transitions, use it.
-// 2) Otherwise, if there are transition times, and the first
-//    transition is to a zone in daylight time, find the first
-//    non-daylight-time zone before and closest to the first transition
-//    zone.
-// 3) Otherwise, use the first zone that is not daylight time, if
-//    there is one.
-// 4) Otherwise, use the first zone.
+//  1) If the first zone is unused by the transitions, use it.
+//  2) Otherwise, if there are transition times, and the first
+//     transition is to a zone in daylight time, find the first
+//     non-daylight-time zone before and closest to the first transition
+//     zone.
+//  3) Otherwise, use the first zone that is not daylight time, if
+//     there is one.
+//  4) Otherwise, use the first zone.
 func (l *Location) lookupFirstZone() int {
 	// Case 1.
 	if !l.firstZoneUsed() {
-- 
cgit v1.3


From 89dff118ada91061350aa149b54a2ab4fdbd6810 Mon Sep 17 00:00:00 2001
From: Russ Cox 
Date: Sun, 30 Jan 2022 19:22:46 -0500
Subject: all: fix TODO comment hanging indents

For whatever reason (perhaps some tool does this), a handful of comments,
including some doc comments, have TODOs formatted like:

	// TODO(name): Text here and
	//             more text aligned
	//             under first text.

In doc comments the second line turns into a 
 block,
which is undesirable in this context.

Rewrite those to unindent, like this instead:

	// TODO(name): Text here and
	// more text aligned
	// at left column.

For #51082.

Change-Id: Ibf5145659a61ebf9496f016752a709a7656d2d4b
Reviewed-on: https://go-review.googlesource.com/c/go/+/384258
Trust: Russ Cox 
Run-TryBot: Russ Cox 
Reviewed-by: Ian Lance Taylor 
TryBot-Result: Gopher Robot 
---
 src/cmd/compile/internal/ssa/func_test.go      |  2 +-
 src/cmd/compile/internal/syntax/nodes.go       |  2 +-
 src/cmd/compile/internal/syntax/pos.go         |  2 +-
 src/cmd/compile/internal/syntax/tokens.go      |  4 ++--
 src/cmd/compile/internal/syntax/walk.go        |  2 +-
 src/cmd/compile/internal/types2/assignments.go |  4 ++--
 src/cmd/compile/internal/types2/lookup.go      |  6 +++---
 src/cmd/compile/internal/types2/named.go       |  2 +-
 src/cmd/compile/internal/types2/return.go      |  4 ++--
 src/cmd/compile/internal/types2/stmt.go        |  2 +-
 src/cmd/compile/internal/types2/validtype.go   | 10 +++++-----
 src/go/ast/walk.go                             |  2 +-
 src/go/constant/value.go                       |  6 +++---
 src/go/parser/performance_test.go              |  4 ++--
 src/go/printer/nodes.go                        | 14 +++++++-------
 src/go/printer/testdata/parser.go              |  2 +-
 src/go/types/lookup.go                         |  6 +++---
 src/go/types/named.go                          |  2 +-
 src/go/types/return.go                         |  4 ++--
 src/go/types/stmt.go                           |  2 +-
 src/go/types/validtype.go                      | 10 +++++-----
 src/math/big/arith_test.go                     |  2 +-
 src/net/http/transport_test.go                 |  2 +-
 src/reflect/type.go                            |  2 +-
 24 files changed, 49 insertions(+), 49 deletions(-)

(limited to 'src/math')

diff --git a/src/cmd/compile/internal/ssa/func_test.go b/src/cmd/compile/internal/ssa/func_test.go
index 276c444b9a..bbb228d8a5 100644
--- a/src/cmd/compile/internal/ssa/func_test.go
+++ b/src/cmd/compile/internal/ssa/func_test.go
@@ -34,7 +34,7 @@ package ssa
 
 // TODO(matloob): Choose better names for Fun, Bloc, Goto, etc.
 // TODO(matloob): Write a parser for the Func disassembly. Maybe
-//                the parser can be used instead of Fun.
+// the parser can be used instead of Fun.
 
 import (
 	"cmd/compile/internal/types"
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go
index 2f9b43edef..b0a0918e77 100644
--- a/src/cmd/compile/internal/syntax/nodes.go
+++ b/src/cmd/compile/internal/syntax/nodes.go
@@ -462,7 +462,7 @@ func (simpleStmt) aSimpleStmt() {}
 // Comments
 
 // TODO(gri) Consider renaming to CommentPos, CommentPlacement, etc.
-//           Kind = Above doesn't make much sense.
+// Kind = Above doesn't make much sense.
 type CommentKind uint
 
 const (
diff --git a/src/cmd/compile/internal/syntax/pos.go b/src/cmd/compile/internal/syntax/pos.go
index 1494c0989f..b5e53d268b 100644
--- a/src/cmd/compile/internal/syntax/pos.go
+++ b/src/cmd/compile/internal/syntax/pos.go
@@ -24,7 +24,7 @@ type Pos struct {
 func MakePos(base *PosBase, line, col uint) Pos { return Pos{base, sat32(line), sat32(col)} }
 
 // TODO(gri) IsKnown makes an assumption about linebase < 1.
-//           Maybe we should check for Base() != nil instead.
+// Maybe we should check for Base() != nil instead.
 
 func (pos Pos) Pos() Pos       { return pos }
 func (pos Pos) IsKnown() bool  { return pos.line > 0 }
diff --git a/src/cmd/compile/internal/syntax/tokens.go b/src/cmd/compile/internal/syntax/tokens.go
index 60eae36ec9..6dece1aa5b 100644
--- a/src/cmd/compile/internal/syntax/tokens.go
+++ b/src/cmd/compile/internal/syntax/tokens.go
@@ -93,8 +93,8 @@ func contains(tokset uint64, tok token) bool {
 type LitKind uint8
 
 // TODO(gri) With the 'i' (imaginary) suffix now permitted on integer
-//           and floating-point numbers, having a single ImagLit does
-//           not represent the literal kind well anymore. Remove it?
+// and floating-point numbers, having a single ImagLit does
+// not represent the literal kind well anymore. Remove it?
 const (
 	IntLit LitKind = iota
 	FloatLit
diff --git a/src/cmd/compile/internal/syntax/walk.go b/src/cmd/compile/internal/syntax/walk.go
index b025844204..8f1d566155 100644
--- a/src/cmd/compile/internal/syntax/walk.go
+++ b/src/cmd/compile/internal/syntax/walk.go
@@ -52,7 +52,7 @@ func Crawl(root Node, f func(Node) bool) {
 // field lists such as type T in "a, b, c T"). Such shared nodes are
 // walked multiple times.
 // TODO(gri) Revisit this design. It may make sense to walk those nodes
-//           only once. A place where this matters is types2.TestResolveIdents.
+// only once. A place where this matters is types2.TestResolveIdents.
 func Walk(root Node, v Visitor) {
 	walker{v}.node(root)
 }
diff --git a/src/cmd/compile/internal/types2/assignments.go b/src/cmd/compile/internal/types2/assignments.go
index 49f4e2d2ab..f766c0b31d 100644
--- a/src/cmd/compile/internal/types2/assignments.go
+++ b/src/cmd/compile/internal/types2/assignments.go
@@ -441,8 +441,8 @@ func (check *Checker) assignVars(lhs, orig_rhs []syntax.Expr) {
 // unpack unpacks a *syntax.ListExpr into a list of syntax.Expr.
 // Helper introduced for the go/types -> types2 port.
 // TODO(gri) Should find a more efficient solution that doesn't
-//           require introduction of a new slice for simple
-//           expressions.
+// require introduction of a new slice for simple
+// expressions.
 func unpackExpr(x syntax.Expr) []syntax.Expr {
 	if x, _ := x.(*syntax.ListExpr); x != nil {
 		return x.ElemList
diff --git a/src/cmd/compile/internal/types2/lookup.go b/src/cmd/compile/internal/types2/lookup.go
index 0832877226..335e4d0c23 100644
--- a/src/cmd/compile/internal/types2/lookup.go
+++ b/src/cmd/compile/internal/types2/lookup.go
@@ -83,9 +83,9 @@ func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (o
 }
 
 // TODO(gri) The named type consolidation and seen maps below must be
-//           indexed by unique keys for a given type. Verify that named
-//           types always have only one representation (even when imported
-//           indirectly via different packages.)
+// indexed by unique keys for a given type. Verify that named
+// types always have only one representation (even when imported
+// indirectly via different packages.)
 
 // lookupFieldOrMethod should only be called by LookupFieldOrMethod and missingMethod.
 // If foldCase is true, the lookup for methods will include looking for any method
diff --git a/src/cmd/compile/internal/types2/named.go b/src/cmd/compile/internal/types2/named.go
index 584ee51a13..1d3703ffd9 100644
--- a/src/cmd/compile/internal/types2/named.go
+++ b/src/cmd/compile/internal/types2/named.go
@@ -107,7 +107,7 @@ func (t *Named) Obj() *TypeName { return t.orig.obj } // for non-instances this
 func (t *Named) Origin() *Named { return t.orig }
 
 // TODO(gri) Come up with a better representation and API to distinguish
-//           between parameterized instantiated and non-instantiated types.
+// between parameterized instantiated and non-instantiated types.
 
 // TypeParams returns the type parameters of the named type t, or nil.
 // The result is non-nil for an (originally) generic type even if it is instantiated.
diff --git a/src/cmd/compile/internal/types2/return.go b/src/cmd/compile/internal/types2/return.go
index 6c3e1842ce..7cdea99e08 100644
--- a/src/cmd/compile/internal/types2/return.go
+++ b/src/cmd/compile/internal/types2/return.go
@@ -99,8 +99,8 @@ func (check *Checker) isTerminatingSwitch(body []*syntax.CaseClause, label strin
 }
 
 // TODO(gri) For nested breakable statements, the current implementation of hasBreak
-//	     will traverse the same subtree repeatedly, once for each label. Replace
-//           with a single-pass label/break matching phase.
+// will traverse the same subtree repeatedly, once for each label. Replace
+// with a single-pass label/break matching phase.
 
 // hasBreak reports if s is or contains a break statement
 // referring to the label-ed statement or implicit-ly the
diff --git a/src/cmd/compile/internal/types2/stmt.go b/src/cmd/compile/internal/types2/stmt.go
index 2b6abbde7e..e00f73ce99 100644
--- a/src/cmd/compile/internal/types2/stmt.go
+++ b/src/cmd/compile/internal/types2/stmt.go
@@ -312,7 +312,7 @@ L:
 }
 
 // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead.
-//           (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
+// (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
 //
 // func (check *Checker) caseTypes(x *operand, xtyp *Interface, types []syntax.Expr, seen map[string]syntax.Expr) (T Type) {
 // 	var dummy operand
diff --git a/src/cmd/compile/internal/types2/validtype.go b/src/cmd/compile/internal/types2/validtype.go
index c7d42551dd..d495c6788e 100644
--- a/src/cmd/compile/internal/types2/validtype.go
+++ b/src/cmd/compile/internal/types2/validtype.go
@@ -141,8 +141,8 @@ func (env *tparamEnv) push(typ *Named) *tparamEnv {
 }
 
 // TODO(gri) Alternative implementation:
-//           We may not need to build a stack of environments to
-//           look up the type arguments for type parameters. The
-//           same information should be available via the path:
-//           We should be able to just walk the path backwards
-//           and find the type arguments in the instance objects.
+// We may not need to build a stack of environments to
+// look up the type arguments for type parameters. The
+// same information should be available via the path:
+// We should be able to just walk the path backwards
+// and find the type arguments in the instance objects.
diff --git a/src/go/ast/walk.go b/src/go/ast/walk.go
index 308662f633..16b15f11f2 100644
--- a/src/go/ast/walk.go
+++ b/src/go/ast/walk.go
@@ -40,7 +40,7 @@ func walkDeclList(v Visitor, list []Decl) {
 }
 
 // TODO(gri): Investigate if providing a closure to Walk leads to
-//            simpler use (and may help eliminate Inspect in turn).
+// simpler use (and may help eliminate Inspect in turn).
 
 // Walk traverses an AST in depth-first order: It starts by calling
 // v.Visit(node); node must not be nil. If the visitor w returned by
diff --git a/src/go/constant/value.go b/src/go/constant/value.go
index dee3bce9ee..544801bd70 100644
--- a/src/go/constant/value.go
+++ b/src/go/constant/value.go
@@ -70,9 +70,9 @@ type Value interface {
 const prec = 512
 
 // TODO(gri) Consider storing "error" information in an unknownVal so clients
-//           can provide better error messages. For instance, if a number is
-//           too large (incl. infinity), that could be recorded in unknownVal.
-//           See also #20583 and #42695 for use cases.
+// can provide better error messages. For instance, if a number is
+// too large (incl. infinity), that could be recorded in unknownVal.
+// See also #20583 and #42695 for use cases.
 
 // Representation of values:
 //
diff --git a/src/go/parser/performance_test.go b/src/go/parser/performance_test.go
index 6f8a97770b..1249f35d39 100644
--- a/src/go/parser/performance_test.go
+++ b/src/go/parser/performance_test.go
@@ -10,8 +10,8 @@ import (
 	"testing"
 )
 
-// TODO(rFindley): use a testdata file or file from another package here, to
-//                 avoid a moving target.
+// TODO(rfindley): use a testdata file or file from another package here, to
+// avoid a moving target.
 var src = readFile("parser.go")
 
 func readFile(filename string) []byte {
diff --git a/src/go/printer/nodes.go b/src/go/printer/nodes.go
index 9a09d58eb2..89e8016409 100644
--- a/src/go/printer/nodes.go
+++ b/src/go/printer/nodes.go
@@ -38,12 +38,12 @@ import (
 // printed.
 //
 // TODO(gri): linebreak may add too many lines if the next statement at "line"
-//            is preceded by comments because the computation of n assumes
-//            the current position before the comment and the target position
-//            after the comment. Thus, after interspersing such comments, the
-//            space taken up by them is not considered to reduce the number of
-//            linebreaks. At the moment there is no easy way to know about
-//            future (not yet interspersed) comments in this function.
+// is preceded by comments because the computation of n assumes
+// the current position before the comment and the target position
+// after the comment. Thus, after interspersing such comments, the
+// space taken up by them is not considered to reduce the number of
+// linebreaks. At the moment there is no easy way to know about
+// future (not yet interspersed) comments in this function.
 //
 func (p *printer) linebreak(line, min int, ws whiteSpace, newSection bool) (nbreaks int) {
 	n := nlimit(line - p.pos.Line)
@@ -125,7 +125,7 @@ const filteredMsg = "contains filtered or unexported fields"
 // expressions.
 //
 // TODO(gri) Consider rewriting this to be independent of []ast.Expr
-//           so that we can use the algorithm for any kind of list
+// so that we can use the algorithm for any kind of list
 //           (e.g., pass list via a channel over which to range).
 func (p *printer) exprList(prev0 token.Pos, list []ast.Expr, depth int, mode exprListMode, next0 token.Pos, isIncomplete bool) {
 	if len(list) == 0 {
diff --git a/src/go/printer/testdata/parser.go b/src/go/printer/testdata/parser.go
index 7e8379739c..615aceebd2 100644
--- a/src/go/printer/testdata/parser.go
+++ b/src/go/printer/testdata/parser.go
@@ -1352,7 +1352,7 @@ func (p *parser) parseBinaryExpr(lhs bool, prec1 int) ast.Expr {
 
 // If lhs is set and the result is an identifier, it is not resolved.
 // TODO(gri): parseExpr may return a type or even a raw type ([..]int) -
-//            should reject when a type/raw type is obviously not allowed
+// should reject when a type/raw type is obviously not allowed
 func (p *parser) parseExpr(lhs bool) ast.Expr {
 	if p.trace {
 		defer un(trace(p, "Expression"))
diff --git a/src/go/types/lookup.go b/src/go/types/lookup.go
index 335fada7b7..77fc17f5c3 100644
--- a/src/go/types/lookup.go
+++ b/src/go/types/lookup.go
@@ -83,9 +83,9 @@ func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (o
 }
 
 // TODO(gri) The named type consolidation and seen maps below must be
-//           indexed by unique keys for a given type. Verify that named
-//           types always have only one representation (even when imported
-//           indirectly via different packages.)
+// indexed by unique keys for a given type. Verify that named
+// types always have only one representation (even when imported
+// indirectly via different packages.)
 
 // lookupFieldOrMethod should only be called by LookupFieldOrMethod and missingMethod.
 // If foldCase is true, the lookup for methods will include looking for any method
diff --git a/src/go/types/named.go b/src/go/types/named.go
index e4fd96ab64..ee35080142 100644
--- a/src/go/types/named.go
+++ b/src/go/types/named.go
@@ -109,7 +109,7 @@ func (t *Named) Obj() *TypeName {
 func (t *Named) Origin() *Named { return t.orig }
 
 // TODO(gri) Come up with a better representation and API to distinguish
-//           between parameterized instantiated and non-instantiated types.
+// between parameterized instantiated and non-instantiated types.
 
 // TypeParams returns the type parameters of the named type t, or nil.
 // The result is non-nil for an (originally) generic type even if it is instantiated.
diff --git a/src/go/types/return.go b/src/go/types/return.go
index 2d34a70b98..ee8c41a431 100644
--- a/src/go/types/return.go
+++ b/src/go/types/return.go
@@ -101,8 +101,8 @@ func (check *Checker) isTerminatingSwitch(body *ast.BlockStmt, label string) boo
 }
 
 // TODO(gri) For nested breakable statements, the current implementation of hasBreak
-//	     will traverse the same subtree repeatedly, once for each label. Replace
-//           with a single-pass label/break matching phase.
+// will traverse the same subtree repeatedly, once for each label. Replace
+// with a single-pass label/break matching phase.
 
 // hasBreak reports if s is or contains a break statement
 // referring to the label-ed statement or implicit-ly the
diff --git a/src/go/types/stmt.go b/src/go/types/stmt.go
index d7f6a486ca..0fab70719e 100644
--- a/src/go/types/stmt.go
+++ b/src/go/types/stmt.go
@@ -317,7 +317,7 @@ L:
 }
 
 // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead.
-//           (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
+// (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
 //
 // func (check *Checker) caseTypes(x *operand, xtyp *Interface, types []ast.Expr, seen map[string]ast.Expr) (T Type) {
 // 	var dummy operand
diff --git a/src/go/types/validtype.go b/src/go/types/validtype.go
index 2c686f2655..edb4c02ecd 100644
--- a/src/go/types/validtype.go
+++ b/src/go/types/validtype.go
@@ -140,8 +140,8 @@ func (env *tparamEnv) push(typ *Named) *tparamEnv {
 }
 
 // TODO(gri) Alternative implementation:
-//           We may not need to build a stack of environments to
-//           look up the type arguments for type parameters. The
-//           same information should be available via the path:
-//           We should be able to just walk the path backwards
-//           and find the type arguments in the instance objects.
+// We may not need to build a stack of environments to
+// look up the type arguments for type parameters. The
+// same information should be available via the path:
+// We should be able to just walk the path backwards
+// and find the type arguments in the instance objects.
diff --git a/src/math/big/arith_test.go b/src/math/big/arith_test.go
index 7b3427f834..789b96bf35 100644
--- a/src/math/big/arith_test.go
+++ b/src/math/big/arith_test.go
@@ -510,7 +510,7 @@ func testFunVWW(t *testing.T, msg string, f funVWW, a argVWW) {
 }
 
 // TODO(gri) mulAddVWW and divWVW are symmetric operations but
-//           their signature is not symmetric. Try to unify.
+// their signature is not symmetric. Try to unify.
 
 type funWVW func(z []Word, xn Word, x []Word, y Word) (r Word)
 type argWVW struct {
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index e5d60afb1b..440d6b969b 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -48,7 +48,7 @@ import (
 )
 
 // TODO: test 5 pipelined requests with responses: 1) OK, 2) OK, Connection: Close
-//       and then verify that the final 2 responses get errors back.
+// and then verify that the final 2 responses get errors back.
 
 // hostPortHandler writes back the client's "host:port".
 var hostPortHandler = HandlerFunc(func(w ResponseWriter, r *Request) {
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 83047062bd..9589e83dbd 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -1267,7 +1267,7 @@ func (t *structType) Field(i int) (f StructField) {
 }
 
 // TODO(gri): Should there be an error/bool indicator if the index
-//            is wrong for FieldByIndex?
+// is wrong for FieldByIndex?
 
 // FieldByIndex returns the nested field corresponding to index.
 func (t *structType) FieldByIndex(index []int) (f StructField) {
-- 
cgit v1.3


From 690ac4071fa3e07113bf371c9e74394ab54d6749 Mon Sep 17 00:00:00 2001
From: Russ Cox 
Date: Sun, 30 Jan 2022 20:11:47 -0500
Subject: all: remove trailing blank doc comment lines

A future change to gofmt will rewrite

	// Doc comment.
	//
	func f()

to

	// Doc comment.
	func f()

Apply that change preemptively to all doc comments.

For #51082.

Change-Id: I4023e16cfb0729b64a8590f071cd92f17343081d
Reviewed-on: https://go-review.googlesource.com/c/go/+/384259
Trust: Russ Cox 
Run-TryBot: Russ Cox 
Reviewed-by: Ian Lance Taylor 
TryBot-Result: Gopher Robot 
---
 src/archive/zip/reader_test.go                   |  1 -
 src/bufio/scan.go                                |  1 -
 src/cmd/asm/internal/asm/parse.go                |  1 -
 src/cmd/cgo/gcc.go                               |  1 -
 src/cmd/compile/internal/importer/gcimporter.go  |  2 --
 src/cmd/compile/internal/ir/fmt.go               |  3 ---
 src/cmd/compile/internal/ir/mini.go              |  1 -
 src/cmd/compile/internal/reflectdata/reflect.go  |  1 -
 src/cmd/compile/internal/ssa/compile.go          |  1 -
 src/cmd/compile/internal/ssa/debug.go            |  1 -
 src/cmd/compile/internal/ssa/debug_test.go       |  1 -
 src/cmd/compile/internal/ssa/poset.go            |  1 -
 src/cmd/compile/internal/syntax/parser.go        |  1 -
 src/cmd/compile/internal/syntax/syntax.go        |  1 -
 src/cmd/compile/internal/test/zerorange_test.go  |  1 -
 src/cmd/compile/internal/types/fmt.go            |  2 --
 src/cmd/compile/internal/types2/api.go           |  2 --
 src/cmd/compile/internal/types2/builtins.go      |  1 -
 src/cmd/compile/internal/types2/expr.go          |  5 -----
 src/cmd/compile/internal/types2/lookup.go        |  2 --
 src/cmd/compile/internal/types2/object.go        |  1 -
 src/cmd/compile/internal/types2/operand.go       |  3 ---
 src/cmd/compile/internal/types2/selection.go     |  2 --
 src/cmd/compile/internal/types2/sizes.go         |  1 -
 src/cmd/compile/internal/types2/typestring.go    |  1 -
 src/cmd/compile/internal/types2/typeterm.go      |  1 -
 src/cmd/compile/internal/types2/typexpr.go       |  3 ---
 src/cmd/compile/internal/types2/universe.go      |  1 -
 src/cmd/compile/internal/walk/builtin.go         |  1 -
 src/cmd/cover/cover_test.go                      |  1 -
 src/cmd/dist/buildruntime.go                     |  2 --
 src/cmd/go/internal/cache/cache.go               |  1 -
 src/cmd/go/internal/imports/build.go             |  1 -
 src/cmd/go/internal/modload/load.go              |  1 -
 src/cmd/go/internal/vet/vetflag.go               |  1 -
 src/cmd/go/internal/work/exec.go                 |  2 --
 src/cmd/go/script_test.go                        |  1 -
 src/cmd/internal/obj/riscv/obj.go                |  1 -
 src/cmd/internal/obj/x86/asm6.go                 |  2 --
 src/cmd/link/internal/ld/dwarf_test.go           |  1 -
 src/cmd/link/internal/loader/loader.go           |  1 -
 src/container/ring/ring.go                       |  5 -----
 src/crypto/elliptic/internal/fiat/p224_fiat64.go |  7 -------
 src/crypto/elliptic/internal/fiat/p384_fiat64.go |  7 -------
 src/crypto/elliptic/internal/fiat/p521_fiat64.go |  7 -------
 src/crypto/elliptic/p256_ppc64le.go              |  2 --
 src/crypto/tls/cipher_suites.go                  |  1 -
 src/database/sql/fakedb_test.go                  |  1 -
 src/database/sql/sql.go                          |  1 -
 src/debug/dwarf/entry.go                         |  1 -
 src/encoding/ascii85/ascii85.go                  |  1 -
 src/encoding/binary/varint.go                    |  2 --
 src/encoding/json/decode.go                      |  1 -
 src/encoding/json/encode.go                      |  1 -
 src/encoding/json/stream.go                      |  1 -
 src/go/ast/ast.go                                | 16 ----------------
 src/go/ast/commentmap.go                         | 11 -----------
 src/go/ast/commentmap_test.go                    |  1 -
 src/go/ast/filter.go                             |  9 ---------
 src/go/ast/filter_test.go                        |  1 -
 src/go/ast/resolve.go                            |  1 -
 src/go/ast/scope.go                              |  4 ----
 src/go/ast/walk.go                               |  2 --
 src/go/build/build.go                            |  2 --
 src/go/build/deps_test.go                        |  1 -
 src/go/constant/value.go                         |  7 -------
 src/go/doc/doc.go                                |  2 --
 src/go/doc/example.go                            |  1 -
 src/go/doc/exports.go                            |  7 -------
 src/go/doc/filter.go                             |  1 -
 src/go/doc/reader.go                             | 22 ----------------------
 src/go/doc/synopsis.go                           |  2 --
 src/go/format/benchmark_test.go                  |  1 -
 src/go/format/format.go                          |  2 --
 src/go/internal/gccgoimporter/parser.go          |  2 --
 src/go/internal/gcimporter/exportdata.go         |  1 -
 src/go/internal/gcimporter/gcimporter.go         |  2 --
 src/go/parser/error_test.go                      |  3 ---
 src/go/parser/interface.go                       |  6 ------
 src/go/parser/parser.go                          |  6 ------
 src/go/parser/resolver.go                        |  1 -
 src/go/printer/nodes.go                          |  7 -------
 src/go/printer/printer.go                        | 16 ----------------
 src/go/printer/printer_test.go                   |  1 -
 src/go/printer/testdata/parser.go                |  5 -----
 src/go/scanner/errors.go                         |  4 ----
 src/go/scanner/scanner.go                        |  5 -----
 src/go/token/position.go                         | 23 -----------------------
 src/go/token/token.go                            | 10 ----------
 src/go/types/api.go                              |  2 --
 src/go/types/builtins.go                         |  1 -
 src/go/types/check_test.go                       |  2 --
 src/go/types/eval.go                             |  1 -
 src/go/types/expr.go                             |  5 -----
 src/go/types/index.go                            |  1 -
 src/go/types/lookup.go                           |  2 --
 src/go/types/object.go                           |  1 -
 src/go/types/operand.go                          |  3 ---
 src/go/types/selection.go                        |  2 --
 src/go/types/sizes.go                            |  1 -
 src/go/types/typestring.go                       |  1 -
 src/go/types/typeterm.go                         |  1 -
 src/go/types/typexpr.go                          |  3 ---
 src/go/types/universe.go                         |  1 -
 src/html/template/template.go                    |  1 -
 src/index/suffixarray/suffixarray.go             |  3 ---
 src/internal/fmtsort/sort.go                     |  1 -
 src/io/fs/walk.go                                |  1 -
 src/math/big/float.go                            |  3 ---
 src/math/big/floatconv.go                        |  2 --
 src/math/big/int.go                              |  6 ------
 src/math/big/intconv.go                          |  2 --
 src/math/big/nat.go                              |  1 -
 src/math/big/natconv.go                          |  2 --
 src/math/big/rat.go                              |  2 --
 src/math/rand/exp.go                             |  1 -
 src/math/rand/normal.go                          |  1 -
 src/math/rand/rand.go                            |  2 --
 src/net/http/client.go                           |  1 -
 src/net/http/fs.go                               |  1 -
 src/net/http/transport.go                        |  1 -
 src/net/textproto/reader.go                      |  4 ----
 src/net/textproto/textproto.go                   |  1 -
 src/path/filepath/match.go                       |  1 -
 src/path/match.go                                |  1 -
 src/reflect/all_test.go                          |  1 -
 src/reflect/makefunc.go                          |  1 -
 src/reflect/value.go                             |  2 --
 src/regexp/exec_test.go                          |  1 -
 src/regexp/syntax/parse.go                       |  1 -
 src/runtime/chan.go                              |  2 --
 src/runtime/compiler.go                          |  1 -
 src/runtime/lock_sema.go                         |  1 -
 src/runtime/pprof/pprof.go                       |  2 --
 src/runtime/profbuf.go                           |  1 -
 src/runtime/trace/annotation.go                  |  1 -
 src/sort/search.go                               |  4 ----
 src/sort/search_test.go                          |  1 -
 src/sort/sort.go                                 |  1 -
 src/strconv/itoa.go                              |  1 -
 src/sync/cond.go                                 |  1 -
 src/sync/once.go                                 |  1 -
 src/testing/fstest/testfs.go                     |  1 -
 src/text/scanner/scanner.go                      |  1 -
 src/text/tabwriter/tabwriter.go                  |  9 ---------
 src/text/template/option.go                      |  1 -
 src/time/format.go                               |  1 -
 src/time/time.go                                 |  2 --
 src/unicode/letter.go                            |  1 -
 src/unsafe/unsafe.go                             |  1 -
 150 files changed, 387 deletions(-)

(limited to 'src/math')

diff --git a/src/archive/zip/reader_test.go b/src/archive/zip/reader_test.go
index d1a9bdd334..9bc23642c0 100644
--- a/src/archive/zip/reader_test.go
+++ b/src/archive/zip/reader_test.go
@@ -865,7 +865,6 @@ func returnRecursiveZip() (r io.ReaderAt, size int64) {
 //
 // It's here in hex for the same reason as rZipBytes above: to avoid
 // problems with on-disk virus scanners or other zip processors.
-//
 func biggestZipBytes() []byte {
 	s := `
 0000000 50 4b 03 04 14 00 08 00 08 00 00 00 00 00 00 00
diff --git a/src/bufio/scan.go b/src/bufio/scan.go
index 4846d4f733..e247cbcf32 100644
--- a/src/bufio/scan.go
+++ b/src/bufio/scan.go
@@ -26,7 +26,6 @@ import (
 // advanced arbitrarily far past the last token. Programs that need more
 // control over error handling or large tokens, or must run sequential scans
 // on a reader, should use bufio.Reader instead.
-//
 type Scanner struct {
 	r            io.Reader // The reader provided by the client.
 	split        SplitFunc // The function to split the tokens.
diff --git a/src/cmd/asm/internal/asm/parse.go b/src/cmd/asm/internal/asm/parse.go
index 0bdf868f48..59aedbf0cc 100644
--- a/src/cmd/asm/internal/asm/parse.go
+++ b/src/cmd/asm/internal/asm/parse.go
@@ -855,7 +855,6 @@ func (p *Parser) setPseudoRegister(addr *obj.Addr, reg string, isStatic bool, pr
 //
 // Anything else beginning with "<" logs an error if issueError is
 // true, otherwise returns (false, obj.ABI0).
-//
 func (p *Parser) symRefAttrs(name string, issueError bool) (bool, obj.ABI) {
 	abi := obj.ABI0
 	isStatic := false
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index 997a830994..9877182fc4 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -119,7 +119,6 @@ func (p *Package) addToFlag(flag string, args []string) {
 // Would be parsed as:
 //
 //     []string{"a", "b:c d", "ef", `g"`}
-//
 func splitQuoted(s string) (r []string, err error) {
 	var args []string
 	arg := make([]rune, len(s))
diff --git a/src/cmd/compile/internal/importer/gcimporter.go b/src/cmd/compile/internal/importer/gcimporter.go
index 6c27f8b332..bcf0480cfc 100644
--- a/src/cmd/compile/internal/importer/gcimporter.go
+++ b/src/cmd/compile/internal/importer/gcimporter.go
@@ -28,7 +28,6 @@ var pkgExts = [...]string{".a", ".o"}
 // the build.Default build.Context). A relative srcDir is interpreted
 // relative to the current working directory.
 // If no file was found, an empty filename is returned.
-//
 func FindPkg(path, srcDir string) (filename, id string) {
 	if path == "" {
 		return
@@ -84,7 +83,6 @@ func FindPkg(path, srcDir string) (filename, id string) {
 // Import imports a gc-generated package given its import path and srcDir, adds
 // the corresponding package object to the packages map, and returns the object.
 // The packages map must contain all packages already imported.
-//
 func Import(packages map[string]*types2.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types2.Package, err error) {
 	var rc io.ReadCloser
 	var id string
diff --git a/src/cmd/compile/internal/ir/fmt.go b/src/cmd/compile/internal/ir/fmt.go
index 12a463c8a4..a00667b309 100644
--- a/src/cmd/compile/internal/ir/fmt.go
+++ b/src/cmd/compile/internal/ir/fmt.go
@@ -105,7 +105,6 @@ func (o Op) GoString() string {
 //
 //	%v	Go syntax ("+", "<-", "print")
 //	%+v	Debug syntax ("ADD", "RECV", "PRINT")
-//
 func (o Op) Format(s fmt.State, verb rune) {
 	switch verb {
 	default:
@@ -129,7 +128,6 @@ func (o Op) Format(s fmt.State, verb rune) {
 //	%v	Go syntax
 //	%L	Go syntax followed by " (type T)" if type is known.
 //	%+v	Debug syntax, as in Dump.
-//
 func fmtNode(n Node, s fmt.State, verb rune) {
 	// %+v prints Dump.
 	// Otherwise we print Go syntax.
@@ -926,7 +924,6 @@ func ellipsisIf(b bool) string {
 //	%v	Go syntax, semicolon-separated
 //	%.v	Go syntax, comma-separated
 //	%+v	Debug syntax, as in DumpList.
-//
 func (l Nodes) Format(s fmt.State, verb rune) {
 	if s.Flag('+') && verb == 'v' {
 		// %+v is DumpList output
diff --git a/src/cmd/compile/internal/ir/mini.go b/src/cmd/compile/internal/ir/mini.go
index 801a48a78e..98c0ffa5b0 100644
--- a/src/cmd/compile/internal/ir/mini.go
+++ b/src/cmd/compile/internal/ir/mini.go
@@ -27,7 +27,6 @@ import (
 // The embedding struct should also fill in n.op in its constructor,
 // for more useful panic messages when invalid methods are called,
 // instead of implementing Op itself.
-//
 type miniNode struct {
 	pos  src.XPos // uint32
 	op   Op       // uint8
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index 908f81865e..9961c8f65a 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -1500,7 +1500,6 @@ func (a typesByString) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
 // use bitmaps for objects up to 64 kB in size.
 //
 // Also known to reflect/type.go.
-//
 const maxPtrmaskBytes = 2048
 
 // GCSym returns a data symbol containing GC information for type t, along
diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go
index d006bf9a3b..f95140eaf9 100644
--- a/src/cmd/compile/internal/ssa/compile.go
+++ b/src/cmd/compile/internal/ssa/compile.go
@@ -259,7 +259,6 @@ var GenssaDump map[string]bool = make(map[string]bool) // names of functions to
 // GO_GCFLAGS=-d=ssa/generic_cse/time,ssa/generic_cse/stats,ssa/generic_cse/debug=3 ./make.bash
 //
 // BOOT_GO_GCFLAGS=-d='ssa/~^.*scc$/off' GO_GCFLAGS='-d=ssa/~^.*scc$/off' ./make.bash
-//
 func PhaseOption(phase, flag string, val int, valString string) string {
 	switch phase {
 	case "", "help":
diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go
index aad59fa24e..08dc5c468e 100644
--- a/src/cmd/compile/internal/ssa/debug.go
+++ b/src/cmd/compile/internal/ssa/debug.go
@@ -428,7 +428,6 @@ func (sc *slotCanonicalizer) canonSlot(idx SlKeyIdx) LocalSlot {
 // This function examines the live OpArg{Int,Float}Reg values and
 // synthesizes new (dead) values for the non-live params or the
 // non-live pieces of partially live params.
-//
 func PopulateABIInRegArgOps(f *Func) {
 	pri := f.ABISelf.ABIAnalyzeFuncType(f.Type.FuncType())
 
diff --git a/src/cmd/compile/internal/ssa/debug_test.go b/src/cmd/compile/internal/ssa/debug_test.go
index b20041c1b5..2fc12557c0 100644
--- a/src/cmd/compile/internal/ssa/debug_test.go
+++ b/src/cmd/compile/internal/ssa/debug_test.go
@@ -93,7 +93,6 @@ var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gog
 // go test debug_test.go -args -u
 // (for Delve)
 // go test debug_test.go -args -u -d
-//
 func TestNexting(t *testing.T) {
 	testenv.SkipFlaky(t, 37404)
 
diff --git a/src/cmd/compile/internal/ssa/poset.go b/src/cmd/compile/internal/ssa/poset.go
index ee884ca761..200106e66d 100644
--- a/src/cmd/compile/internal/ssa/poset.go
+++ b/src/cmd/compile/internal/ssa/poset.go
@@ -145,7 +145,6 @@ type posetNode struct {
 //       I  extra
 //           /  \
 //          J    K
-//
 type poset struct {
 	lastidx   uint32            // last generated dense index
 	flags     uint8             // internal flags
diff --git a/src/cmd/compile/internal/syntax/parser.go b/src/cmd/compile/internal/syntax/parser.go
index 6574b01371..f18d526877 100644
--- a/src/cmd/compile/internal/syntax/parser.go
+++ b/src/cmd/compile/internal/syntax/parser.go
@@ -471,7 +471,6 @@ func isEmptyFuncDecl(dcl Decl) bool {
 // elements are accepted. list returns the position of the closing token.
 //
 // list = [ f { sep f } [sep] ] close .
-//
 func (p *parser) list(context string, sep, close token, f func() bool) Pos {
 	if debug && (sep != _Comma && sep != _Semi || close != _Rparen && close != _Rbrace && close != _Rbrack) {
 		panic("invalid sep or close argument for list")
diff --git a/src/cmd/compile/internal/syntax/syntax.go b/src/cmd/compile/internal/syntax/syntax.go
index e51b5538b3..83b102da9f 100644
--- a/src/cmd/compile/internal/syntax/syntax.go
+++ b/src/cmd/compile/internal/syntax/syntax.go
@@ -63,7 +63,6 @@ type PragmaHandler func(pos Pos, blank bool, text string, current Pragma) Pragma
 // error, and the returned syntax tree is nil.
 //
 // If pragh != nil, it is called with each pragma encountered.
-//
 func Parse(base *PosBase, src io.Reader, errh ErrorHandler, pragh PragmaHandler, mode Mode) (_ *File, first error) {
 	defer func() {
 		if p := recover(); p != nil {
diff --git a/src/cmd/compile/internal/test/zerorange_test.go b/src/cmd/compile/internal/test/zerorange_test.go
index ec87136157..e92b5d342f 100644
--- a/src/cmd/compile/internal/test/zerorange_test.go
+++ b/src/cmd/compile/internal/test/zerorange_test.go
@@ -170,7 +170,6 @@ func triggerZerorangeSmall(f, g, h uint64) (rv0 uint64) {
 // depending on the size of the thing that needs to be zeroed out
 // (I've verified at the time of the writing of this test that it
 // exercises the various cases).
-//
 func TestZerorange45372(t *testing.T) {
 	if r := triggerZerorangeLarge(101, 303, 505); r != 1010 {
 		t.Errorf("large: wanted %d got %d", 1010, r)
diff --git a/src/cmd/compile/internal/types/fmt.go b/src/cmd/compile/internal/types/fmt.go
index a42d97cd31..bdd3ca1d28 100644
--- a/src/cmd/compile/internal/types/fmt.go
+++ b/src/cmd/compile/internal/types/fmt.go
@@ -83,7 +83,6 @@ const (
 //	%v	Go syntax: Name for symbols in the local package, PkgName.Name for imported symbols.
 //	%+v	Debug syntax: always include PkgName. prefix even for local names.
 //	%S	Short syntax: Name only, no matter what.
-//
 func (s *Sym) Format(f fmt.State, verb rune) {
 	mode := fmtGo
 	switch verb {
@@ -241,7 +240,6 @@ var fmtBufferPool = sync.Pool{
 //	%L	Go syntax for underlying type if t is named
 //	%S	short Go syntax: drop leading "func" in function type
 //	%-S	special case for method receiver symbol
-//
 func (t *Type) Format(s fmt.State, verb rune) {
 	mode := fmtGo
 	switch verb {
diff --git a/src/cmd/compile/internal/types2/api.go b/src/cmd/compile/internal/types2/api.go
index d864c96fb6..34bb29cadc 100644
--- a/src/cmd/compile/internal/types2/api.go
+++ b/src/cmd/compile/internal/types2/api.go
@@ -285,7 +285,6 @@ type Info struct {
 
 // TypeOf returns the type of expression e, or nil if not found.
 // Precondition: the Types, Uses and Defs maps are populated.
-//
 func (info *Info) TypeOf(e syntax.Expr) Type {
 	if t, ok := info.Types[e]; ok {
 		return t.Type
@@ -305,7 +304,6 @@ func (info *Info) TypeOf(e syntax.Expr) Type {
 // it defines, not the type (*TypeName) it uses.
 //
 // Precondition: the Uses and Defs maps are populated.
-//
 func (info *Info) ObjectOf(id *syntax.Name) Object {
 	if obj := info.Defs[id]; obj != nil {
 		return obj
diff --git a/src/cmd/compile/internal/types2/builtins.go b/src/cmd/compile/internal/types2/builtins.go
index 428897c628..1bd2fdce06 100644
--- a/src/cmd/compile/internal/types2/builtins.go
+++ b/src/cmd/compile/internal/types2/builtins.go
@@ -16,7 +16,6 @@ import (
 // reports whether the call is valid, with *x holding the result;
 // but x.expr is not set. If the call is invalid, the result is
 // false, and *x is undefined.
-//
 func (check *Checker) builtin(x *operand, call *syntax.CallExpr, id builtinId) (_ bool) {
 	// append is the only built-in that permits the use of ... for the last argument
 	bin := predeclaredFuncs[id]
diff --git a/src/cmd/compile/internal/types2/expr.go b/src/cmd/compile/internal/types2/expr.go
index 23225c8d0d..1ecb4ff54b 100644
--- a/src/cmd/compile/internal/types2/expr.go
+++ b/src/cmd/compile/internal/types2/expr.go
@@ -1211,7 +1211,6 @@ const (
 // If hint != nil, it is the type of a composite literal element.
 // If allowGeneric is set, the operand type may be an uninstantiated
 // parameterized type or function value.
-//
 func (check *Checker) rawExpr(x *operand, e syntax.Expr, hint Type, allowGeneric bool) exprKind {
 	if check.conf.Trace {
 		check.trace(e.Pos(), "-- expr %s", e)
@@ -1259,7 +1258,6 @@ func (check *Checker) nonGeneric(x *operand) {
 
 // exprInternal contains the core of type checking of expressions.
 // Must only be called by rawExpr.
-//
 func (check *Checker) exprInternal(x *operand, e syntax.Expr, hint Type) exprKind {
 	// make sure x has a valid state in case of bailout
 	// (was issue 5770)
@@ -1764,7 +1762,6 @@ func (check *Checker) typeAssertion(e syntax.Expr, x *operand, T Type, typeSwitc
 // expr typechecks expression e and initializes x with the expression value.
 // The result must be a single value.
 // If an error occurred, x.mode is set to invalid.
-//
 func (check *Checker) expr(x *operand, e syntax.Expr) {
 	check.rawExpr(x, e, nil, false)
 	check.exclude(x, 1< (                     )
 // cgofunc     (                      of type )
-//
 func operandString(x *operand, qf Qualifier) string {
 	// special-case nil
 	if x.mode == nilvalue {
diff --git a/src/cmd/compile/internal/types2/selection.go b/src/cmd/compile/internal/types2/selection.go
index 8128aeee2e..ee63214407 100644
--- a/src/cmd/compile/internal/types2/selection.go
+++ b/src/cmd/compile/internal/types2/selection.go
@@ -36,7 +36,6 @@ const (
 //	p.x         FieldVal      T       x      int        {0}       true
 //	p.m         MethodVal     *T      m      func()     {1, 0}    true
 //	T.m         MethodExpr    T       m      func(T)    {1, 0}    false
-//
 type Selection struct {
 	kind     SelectionKind
 	recv     Type   // type of x
@@ -115,7 +114,6 @@ func (s *Selection) String() string { return SelectionString(s, nil) }
 //	"field (T) f int"
 //	"method (T) f(X) Y"
 //	"method expr (T) f(X) Y"
-//
 func SelectionString(s *Selection, qf Qualifier) string {
 	var k string
 	switch s.kind {
diff --git a/src/cmd/compile/internal/types2/sizes.go b/src/cmd/compile/internal/types2/sizes.go
index 6f981964be..7a34b6474c 100644
--- a/src/cmd/compile/internal/types2/sizes.go
+++ b/src/cmd/compile/internal/types2/sizes.go
@@ -39,7 +39,6 @@ type Sizes interface {
 //	  types are naturally aligned with a maximum alignment MaxAlign.
 //
 // *StdSizes implements Sizes.
-//
 type StdSizes struct {
 	WordSize int64 // word size in bytes - must be >= 4 (32bits)
 	MaxAlign int64 // maximum alignment in bytes - must be >= 1
diff --git a/src/cmd/compile/internal/types2/typestring.go b/src/cmd/compile/internal/types2/typestring.go
index ada0529929..e0f36fcec4 100644
--- a/src/cmd/compile/internal/types2/typestring.go
+++ b/src/cmd/compile/internal/types2/typestring.go
@@ -25,7 +25,6 @@ import (
 //
 // Using a nil Qualifier is equivalent to using (*Package).Path: the
 // object is qualified by the import path, e.g., "encoding/json.Marshal".
-//
 type Qualifier func(*Package) string
 
 // RelativeTo returns a Qualifier that fully qualifies members of
diff --git a/src/cmd/compile/internal/types2/typeterm.go b/src/cmd/compile/internal/types2/typeterm.go
index 1d7223f13c..3d82a37ab8 100644
--- a/src/cmd/compile/internal/types2/typeterm.go
+++ b/src/cmd/compile/internal/types2/typeterm.go
@@ -10,7 +10,6 @@ package types2
 //   𝓤:  &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   Type
diff --git a/src/cmd/compile/internal/types2/typexpr.go b/src/cmd/compile/internal/types2/typexpr.go
index afbea06032..8b9976da79 100644
--- a/src/cmd/compile/internal/types2/typexpr.go
+++ b/src/cmd/compile/internal/types2/typexpr.go
@@ -17,7 +17,6 @@ import (
 // If an error occurred, x.mode is set to invalid.
 // For the meaning of def, see Checker.definedType, below.
 // If wantType is set, the identifier e is expected to denote a type.
-//
 func (check *Checker) ident(x *operand, e *syntax.Name, def *Named, wantType bool) {
 	x.mode = invalid
 	x.expr = e
@@ -181,7 +180,6 @@ func (check *Checker) validVarType(e syntax.Expr, typ Type) {
 // If def != nil, e is the type specification for the defined type def, declared
 // in a type declaration, and def.underlying will be set to the type of e before
 // any components of e are type-checked.
-//
 func (check *Checker) definedType(e syntax.Expr, def *Named) Type {
 	typ := check.typInternal(e, def)
 	assert(isTyped(typ))
@@ -216,7 +214,6 @@ func goTypeName(typ Type) string {
 
 // typInternal drives type checking of types.
 // Must only be called by definedType or genericType.
-//
 func (check *Checker) typInternal(e0 syntax.Expr, def *Named) (T Type) {
 	if check.conf.Trace {
 		check.trace(e0.Pos(), "-- type %s", e0)
diff --git a/src/cmd/compile/internal/types2/universe.go b/src/cmd/compile/internal/types2/universe.go
index 1deff3961f..9292924f23 100644
--- a/src/cmd/compile/internal/types2/universe.go
+++ b/src/cmd/compile/internal/types2/universe.go
@@ -245,7 +245,6 @@ func init() {
 // Objects with names containing blanks are internal and not entered into
 // a scope. Objects with exported names are inserted in the unsafe package
 // scope; other objects are inserted in the universe scope.
-//
 func def(obj Object) {
 	assert(obj.color() == black)
 	name := obj.Name()
diff --git a/src/cmd/compile/internal/walk/builtin.go b/src/cmd/compile/internal/walk/builtin.go
index 8fe231161a..7ec5494d99 100644
--- a/src/cmd/compile/internal/walk/builtin.go
+++ b/src/cmd/compile/internal/walk/builtin.go
@@ -133,7 +133,6 @@ func walkClose(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
 //	n;
 //
 // Also works if b is a string.
-//
 func walkCopy(n *ir.BinaryExpr, init *ir.Nodes, runtimecall bool) ir.Node {
 	if n.X.Type().Elem().HasPointers() {
 		ir.CurFunc.SetWBPos(n.Pos())
diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go
index 86c95d15c5..8bd31514a0 100644
--- a/src/cmd/cover/cover_test.go
+++ b/src/cmd/cover/cover_test.go
@@ -165,7 +165,6 @@ func buildCover(t *testing.T) {
 // 	go build -o testcover
 // 	testcover -mode=count -var=CoverTest -o ./testdata/test_cover.go testdata/test_line.go
 //	go run ./testdata/main.go ./testdata/test.go
-//
 func TestCover(t *testing.T) {
 	t.Parallel()
 	testenv.MustHaveGoRun(t)
diff --git a/src/cmd/dist/buildruntime.go b/src/cmd/dist/buildruntime.go
index fdc1d25774..e66a9f009f 100644
--- a/src/cmd/dist/buildruntime.go
+++ b/src/cmd/dist/buildruntime.go
@@ -20,7 +20,6 @@ import (
 //	package sys
 //
 //	const StackGuardMultiplier = 
-//
 func mkzversion(dir, file string) {
 	var buf bytes.Buffer
 	fmt.Fprintf(&buf, "// Code generated by go tool dist; DO NOT EDIT.\n")
@@ -80,7 +79,6 @@ func mkbuildcfg(file string) {
 //	package objabi
 //
 //	const stackGuardMultiplierDefault = 
-//
 func mkobjabi(file string) {
 	var buf bytes.Buffer
 	fmt.Fprintf(&buf, "// Code generated by go tool dist; DO NOT EDIT.\n")
diff --git a/src/cmd/go/internal/cache/cache.go b/src/cmd/go/internal/cache/cache.go
index 93d7c25658..4ac2b818ff 100644
--- a/src/cmd/go/internal/cache/cache.go
+++ b/src/cmd/go/internal/cache/cache.go
@@ -47,7 +47,6 @@ type Cache struct {
 // to share a cache directory (for example, if the directory were stored
 // in a network file system). File locking is notoriously unreliable in
 // network file systems and may not suffice to protect the cache.
-//
 func Open(dir string) (*Cache, error) {
 	info, err := os.Stat(dir)
 	if err != nil {
diff --git a/src/cmd/go/internal/imports/build.go b/src/cmd/go/internal/imports/build.go
index ff6bea6777..10e90fc216 100644
--- a/src/cmd/go/internal/imports/build.go
+++ b/src/cmd/go/internal/imports/build.go
@@ -66,7 +66,6 @@ func isGoBuildComment(line []byte) bool {
 // the purpose of satisfying build tags, in order to estimate
 // (conservatively) whether a file could ever possibly be used
 // in any build.
-//
 func ShouldBuild(content []byte, tags map[string]bool) bool {
 	// Identify leading run of // comments and blank lines,
 	// which must be followed by a blank line.
diff --git a/src/cmd/go/internal/modload/load.go b/src/cmd/go/internal/modload/load.go
index d4847efb98..c170699535 100644
--- a/src/cmd/go/internal/modload/load.go
+++ b/src/cmd/go/internal/modload/load.go
@@ -2151,7 +2151,6 @@ func (ld *loader) buildStacks() {
 //		other2 tested by
 //		other2.test imports
 //		pkg
-//
 func (pkg *loadPkg) stackText() string {
 	var stack []*loadPkg
 	for p := pkg; p != nil; p = p.stack {
diff --git a/src/cmd/go/internal/vet/vetflag.go b/src/cmd/go/internal/vet/vetflag.go
index 3551a5997c..8a55e9cca0 100644
--- a/src/cmd/go/internal/vet/vetflag.go
+++ b/src/cmd/go/internal/vet/vetflag.go
@@ -35,7 +35,6 @@ import (
 // implementation. It is also used by tests.
 //
 // The default behavior (vetTool=="") runs 'go tool vet'.
-//
 var vetTool string // -vettool
 
 func init() {
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
index 6d6837aa8a..4252209f10 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -1948,7 +1948,6 @@ func mayberemovefile(s string) {
 //
 //	fmtcmd replaces the name of the current directory with dot (.)
 //	but only when it is at the beginning of a space-separated token.
-//
 func (b *Builder) fmtcmd(dir string, format string, args ...any) string {
 	cmd := fmt.Sprintf(format, args...)
 	if dir != "" && dir != "/" {
@@ -2005,7 +2004,6 @@ func (b *Builder) Showcmd(dir string, format string, args ...any) {
 //
 // If a is not nil and a.output is not nil, showOutput appends to that slice instead of
 // printing to b.Print.
-//
 func (b *Builder) showOutput(a *Action, dir, desc, out string) {
 	prefix := "# " + desc
 	suffix := "\n" + out
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go
index 76a2b85f96..76c542f32a 100644
--- a/src/cmd/go/script_test.go
+++ b/src/cmd/go/script_test.go
@@ -490,7 +490,6 @@ func isCaseSensitive(t *testing.T) bool {
 // Keep list and the implementations below sorted by name.
 //
 // NOTE: If you make changes here, update testdata/script/README too!
-//
 var scriptCmds = map[string]func(*testScript, simpleStatus, []string){
 	"addcrlf": (*testScript).cmdAddcrlf,
 	"cc":      (*testScript).cmdCc,
diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go
index 2c00c87aa2..956d69ee2e 100644
--- a/src/cmd/internal/obj/riscv/obj.go
+++ b/src/cmd/internal/obj/riscv/obj.go
@@ -324,7 +324,6 @@ func setPCs(p *obj.Prog, pc int64) int64 {
 //
 // A nicer version of this diagram can be found on slide 21 of the presentation
 // attached to https://golang.org/issue/16922#issuecomment-243748180.
-//
 func stackOffset(a *obj.Addr, stacksize int64) {
 	switch a.Name {
 	case obj.NAME_AUTO:
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index a508e484e4..64a0bc96b7 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -59,7 +59,6 @@ var (
 // is very slight but negative, so the alignment is disabled by
 // setting MaxLoopPad = 0. The code is here for reference and
 // for future experiments.
-//
 const (
 	loopAlign  = 16
 	maxLoopPad = 0
@@ -4167,7 +4166,6 @@ func (ab *AsmBuf) asmvex(ctxt *obj.Link, rm, v, r *obj.Addr, vex, opcode uint8)
 //	REG_X15 => 15
 //	REG_R9  => 9
 //	REG_AX  => 0
-//
 func regIndex(r int16) int {
 	lower3bits := reg[r]
 	high4bit := regrex[r] & Rxr << 1
diff --git a/src/cmd/link/internal/ld/dwarf_test.go b/src/cmd/link/internal/ld/dwarf_test.go
index 2f9bf25d10..1f7b37f892 100644
--- a/src/cmd/link/internal/ld/dwarf_test.go
+++ b/src/cmd/link/internal/ld/dwarf_test.go
@@ -1469,7 +1469,6 @@ func TestIssue42484(t *testing.T) {
 //     i1:0:1 f1:1:1 ~r0:2:2 ~r1:3:2
 //
 // where each chunk above is of the form NAME:ORDER:INOUTCLASSIFICATION
-//
 func processParams(die *dwarf.Entry, ex *dwtest.Examiner) string {
 	// Values in the returned map are of the form :
 	// where order is the order within the child DIE list of the
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index d102bb35ce..2cbec5d06f 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -2579,7 +2579,6 @@ type ErrorReporter struct {
 //
 // Logging an error means that on exit cmd/link will delete any
 // output file and return a non-zero error code.
-//
 func (reporter *ErrorReporter) Errorf(s Sym, format string, args ...interface{}) {
 	if s != 0 && reporter.ldr.SymName(s) != "" {
 		// Note: Replace is needed here because symbol names might have % in them,
diff --git a/src/container/ring/ring.go b/src/container/ring/ring.go
index ce15032543..268670bc85 100644
--- a/src/container/ring/ring.go
+++ b/src/container/ring/ring.go
@@ -10,7 +10,6 @@ package ring
 // serves as reference to the entire ring. Empty rings are represented
 // as nil Ring pointers. The zero value for a Ring is a one-element
 // ring with a nil Value.
-//
 type Ring struct {
 	next, prev *Ring
 	Value      any // for use by client; untouched by this library
@@ -40,7 +39,6 @@ func (r *Ring) Prev() *Ring {
 
 // Move moves n % r.Len() elements backward (n < 0) or forward (n >= 0)
 // in the ring and returns that ring element. r must not be empty.
-//
 func (r *Ring) Move(n int) *Ring {
 	if r.next == nil {
 		return r.init()
@@ -89,7 +87,6 @@ func New(n int) *Ring {
 // them creates a single ring with the elements of s inserted
 // after r. The result points to the element following the
 // last element of s after insertion.
-//
 func (r *Ring) Link(s *Ring) *Ring {
 	n := r.Next()
 	if s != nil {
@@ -107,7 +104,6 @@ func (r *Ring) Link(s *Ring) *Ring {
 // Unlink removes n % r.Len() elements from the ring r, starting
 // at r.Next(). If n % r.Len() == 0, r remains unchanged.
 // The result is the removed subring. r must not be empty.
-//
 func (r *Ring) Unlink(n int) *Ring {
 	if n <= 0 {
 		return nil
@@ -117,7 +113,6 @@ func (r *Ring) Unlink(n int) *Ring {
 
 // Len computes the number of elements in ring r.
 // It executes in time proportional to the number of elements.
-//
 func (r *Ring) Len() int {
 	n := 0
 	if r != nil {
diff --git a/src/crypto/elliptic/internal/fiat/p224_fiat64.go b/src/crypto/elliptic/internal/fiat/p224_fiat64.go
index 4ece3e9220..588e9ea620 100644
--- a/src/crypto/elliptic/internal/fiat/p224_fiat64.go
+++ b/src/crypto/elliptic/internal/fiat/p224_fiat64.go
@@ -78,7 +78,6 @@ func p224CmovznzU64(out1 *uint64, arg1 p224Uint1, arg2 uint64, arg3 uint64) {
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p224Mul(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement, arg2 *p224MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -383,7 +382,6 @@ func p224Mul(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
 //   0 ≤ eval out1 < m
-//
 func p224Square(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -689,7 +687,6 @@ func p224Square(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDoma
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p224Add(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement, arg2 *p224MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -739,7 +736,6 @@ func p224Add(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p224Sub(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement, arg2 *p224MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -777,7 +773,6 @@ func p224Sub(out1 *p224MontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = 1 mod m
 //   0 ≤ eval out1 < m
-//
 func p224SetOne(out1 *p224MontgomeryDomainFieldElement) {
 	out1[0] = 0xffffffff00000000
 	out1[1] = 0xffffffffffffffff
@@ -792,7 +787,6 @@ func p224SetOne(out1 *p224MontgomeryDomainFieldElement) {
 // Postconditions:
 //   eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^4) mod m
 //   0 ≤ eval out1 < m
-//
 func p224FromMontgomery(out1 *p224NonMontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement) {
 	x1 := arg1[0]
 	var x2 uint64
@@ -970,7 +964,6 @@ func p224FromMontgomery(out1 *p224NonMontgomeryDomainFieldElement, arg1 *p224Mon
 // Postconditions:
 //   eval (from_montgomery out1) mod m = eval arg1 mod m
 //   0 ≤ eval out1 < m
-//
 func p224ToMontgomery(out1 *p224MontgomeryDomainFieldElement, arg1 *p224NonMontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
diff --git a/src/crypto/elliptic/internal/fiat/p384_fiat64.go b/src/crypto/elliptic/internal/fiat/p384_fiat64.go
index 493bed47e1..dc48cd38fb 100644
--- a/src/crypto/elliptic/internal/fiat/p384_fiat64.go
+++ b/src/crypto/elliptic/internal/fiat/p384_fiat64.go
@@ -78,7 +78,6 @@ func p384CmovznzU64(out1 *uint64, arg1 p384Uint1, arg2 uint64, arg3 uint64) {
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p384Mul(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement, arg2 *p384MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -783,7 +782,6 @@ func p384Mul(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
 //   0 ≤ eval out1 < m
-//
 func p384Square(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -1489,7 +1487,6 @@ func p384Square(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDoma
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p384Add(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement, arg2 *p384MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -1557,7 +1554,6 @@ func p384Add(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p384Sub(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement, arg2 *p384MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -1609,7 +1605,6 @@ func p384Sub(out1 *p384MontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = 1 mod m
 //   0 ≤ eval out1 < m
-//
 func p384SetOne(out1 *p384MontgomeryDomainFieldElement) {
 	out1[0] = 0xffffffff00000001
 	out1[1] = 0xffffffff
@@ -1626,7 +1621,6 @@ func p384SetOne(out1 *p384MontgomeryDomainFieldElement) {
 // Postconditions:
 //   eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^6) mod m
 //   0 ≤ eval out1 < m
-//
 func p384FromMontgomery(out1 *p384NonMontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement) {
 	x1 := arg1[0]
 	var x2 uint64
@@ -2096,7 +2090,6 @@ func p384FromMontgomery(out1 *p384NonMontgomeryDomainFieldElement, arg1 *p384Mon
 // Postconditions:
 //   eval (from_montgomery out1) mod m = eval arg1 mod m
 //   0 ≤ eval out1 < m
-//
 func p384ToMontgomery(out1 *p384MontgomeryDomainFieldElement, arg1 *p384NonMontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
diff --git a/src/crypto/elliptic/internal/fiat/p521_fiat64.go b/src/crypto/elliptic/internal/fiat/p521_fiat64.go
index 9f4f290f4c..ea92c948fd 100644
--- a/src/crypto/elliptic/internal/fiat/p521_fiat64.go
+++ b/src/crypto/elliptic/internal/fiat/p521_fiat64.go
@@ -78,7 +78,6 @@ func p521CmovznzU64(out1 *uint64, arg1 p521Uint1, arg2 uint64, arg3 uint64) {
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p521Mul(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainFieldElement, arg2 *p521MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -1599,7 +1598,6 @@ func p521Mul(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
 //   0 ≤ eval out1 < m
-//
 func p521Square(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainFieldElement) {
 	x1 := arg1[1]
 	x2 := arg1[2]
@@ -3121,7 +3119,6 @@ func p521Square(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDoma
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p521Add(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainFieldElement, arg2 *p521MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -3216,7 +3213,6 @@ func p521Add(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
 //   0 ≤ eval out1 < m
-//
 func p521Sub(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainFieldElement, arg2 *p521MontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
@@ -3289,7 +3285,6 @@ func p521Sub(out1 *p521MontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainF
 // Postconditions:
 //   eval (from_montgomery out1) mod m = 1 mod m
 //   0 ≤ eval out1 < m
-//
 func p521SetOne(out1 *p521MontgomeryDomainFieldElement) {
 	out1[0] = 0x80000000000000
 	out1[1] = uint64(0x0)
@@ -3309,7 +3304,6 @@ func p521SetOne(out1 *p521MontgomeryDomainFieldElement) {
 // Postconditions:
 //   eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^9) mod m
 //   0 ≤ eval out1 < m
-//
 func p521FromMontgomery(out1 *p521NonMontgomeryDomainFieldElement, arg1 *p521MontgomeryDomainFieldElement) {
 	x1 := arg1[0]
 	var x2 uint64
@@ -4263,7 +4257,6 @@ func p521FromMontgomery(out1 *p521NonMontgomeryDomainFieldElement, arg1 *p521Mon
 // Postconditions:
 //   eval (from_montgomery out1) mod m = eval arg1 mod m
 //   0 ≤ eval out1 < m
-//
 func p521ToMontgomery(out1 *p521MontgomeryDomainFieldElement, arg1 *p521NonMontgomeryDomainFieldElement) {
 	var x1 uint64
 	var x2 uint64
diff --git a/src/crypto/elliptic/p256_ppc64le.go b/src/crypto/elliptic/p256_ppc64le.go
index e9a6a067a2..dda1157564 100644
--- a/src/crypto/elliptic/p256_ppc64le.go
+++ b/src/crypto/elliptic/p256_ppc64le.go
@@ -49,7 +49,6 @@ func (curve p256CurveFast) Params() *CurveParams {
 func p256MulAsm(res, in1, in2 []byte)
 
 // Montgomery square modulo P256
-//
 func p256Sqr(res, in []byte) {
 	p256MulAsm(res, in, in)
 }
@@ -98,7 +97,6 @@ func p256PointDoubleAsm(res, in *p256Point)
 // The result should be a slice in LE order, but the slice
 // from big.Bytes is in BE order.
 // TODO: For big endian implementation, do not reverse bytes.
-//
 func fromBig(big *big.Int) []byte {
 	// This could be done a lot more efficiently...
 	res := big.Bytes()
diff --git a/src/crypto/tls/cipher_suites.go b/src/crypto/tls/cipher_suites.go
index d164991eec..408a820d13 100644
--- a/src/crypto/tls/cipher_suites.go
+++ b/src/crypto/tls/cipher_suites.go
@@ -267,7 +267,6 @@ var cipherSuitesTLS13 = []*cipherSuiteTLS13{ // TODO: replace with a map.
 //
 //       The relative order of ECDSA and RSA cipher suites doesn't matter,
 //       as they depend on the certificate. Pick one to get a stable order.
-//
 var cipherSuitesPreferenceOrder = []uint16{
 	// AEADs w/ ECDHE
 	TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
diff --git a/src/database/sql/fakedb_test.go b/src/database/sql/fakedb_test.go
index c3b9d1ce46..d9b40ff53f 100644
--- a/src/database/sql/fakedb_test.go
+++ b/src/database/sql/fakedb_test.go
@@ -1174,7 +1174,6 @@ func (rc *rowsCursor) NextResultSet() error {
 // This could be surprising behavior to retroactively apply to
 // driver.String now that Go1 is out, but this is convenient for
 // our TestPointerParamsAndScans.
-//
 type fakeDriverString struct{}
 
 func (fakeDriverString) ConvertValue(v any) (driver.Value, error) {
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index d55cee1210..9a879464d8 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -184,7 +184,6 @@ type RawBytes []byte
 //  } else {
 //     // NULL value
 //  }
-//
 type NullString struct {
 	String string
 	Valid  bool // Valid is true if String is not NULL
diff --git a/src/debug/dwarf/entry.go b/src/debug/dwarf/entry.go
index 98c17dc08a..9f3f4971e1 100644
--- a/src/debug/dwarf/entry.go
+++ b/src/debug/dwarf/entry.go
@@ -381,7 +381,6 @@ func (i Class) GoString() string {
 // A common idiom is to merge the check for nil return with
 // the check that the value has the expected dynamic type, as in:
 //	v, ok := e.Val(AttrSibling).(int64)
-//
 func (e *Entry) Val(a Attr) any {
 	if f := e.AttrField(a); f != nil {
 		return f.Val
diff --git a/src/encoding/ascii85/ascii85.go b/src/encoding/ascii85/ascii85.go
index f1f7af863c..1f1fb00ffa 100644
--- a/src/encoding/ascii85/ascii85.go
+++ b/src/encoding/ascii85/ascii85.go
@@ -183,7 +183,6 @@ func (e CorruptInputError) Error() string {
 // than wait for the completion of another 32-bit block.
 //
 // NewDecoder wraps an io.Reader interface around Decode.
-//
 func Decode(dst, src []byte, flush bool) (ndst, nsrc int, err error) {
 	var v uint32
 	var nb int
diff --git a/src/encoding/binary/varint.go b/src/encoding/binary/varint.go
index 8fe20b5c45..bfb4dd193e 100644
--- a/src/encoding/binary/varint.go
+++ b/src/encoding/binary/varint.go
@@ -56,7 +56,6 @@ func PutUvarint(buf []byte, x uint64) int {
 // 	n == 0: buf too small
 // 	n  < 0: value larger than 64 bits (overflow)
 // 	        and -n is the number of bytes read
-//
 func Uvarint(buf []byte) (uint64, int) {
 	var x uint64
 	var s uint
@@ -95,7 +94,6 @@ func PutVarint(buf []byte, x int64) int {
 // 	n == 0: buf too small
 // 	n  < 0: value larger than 64 bits (overflow)
 // 	        and -n is the number of bytes read
-//
 func Varint(buf []byte) (int64, int) {
 	ux, n := Uvarint(buf) // ok to continue in presence of error
 	x := int64(ux >> 1)
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go
index 555df0b7e8..ce9675a62f 100644
--- a/src/encoding/json/decode.go
+++ b/src/encoding/json/decode.go
@@ -92,7 +92,6 @@ import (
 // invalid UTF-16 surrogate pairs are not treated as an error.
 // Instead, they are replaced by the Unicode replacement
 // character U+FFFD.
-//
 func Unmarshal(data []byte, v any) error {
 	// Check for well-formedness.
 	// Avoids filling out half a data structure
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go
index 571ac094e2..fc865386ed 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -154,7 +154,6 @@ import (
 // JSON cannot represent cyclic data structures and Marshal does not
 // handle them. Passing cyclic structures to Marshal will result in
 // an error.
-//
 func Marshal(v any) ([]byte, error) {
 	e := newEncodeState()
 
diff --git a/src/encoding/json/stream.go b/src/encoding/json/stream.go
index 6362170d5d..b278ee4013 100644
--- a/src/encoding/json/stream.go
+++ b/src/encoding/json/stream.go
@@ -287,7 +287,6 @@ var _ Unmarshaler = (*RawMessage)(nil)
 //	Number, for JSON numbers
 //	string, for JSON string literals
 //	nil, for JSON null
-//
 type Token any
 
 const (
diff --git a/src/go/ast/ast.go b/src/go/ast/ast.go
index a74a827c8f..61855359f8 100644
--- a/src/go/ast/ast.go
+++ b/src/go/ast/ast.go
@@ -72,7 +72,6 @@ func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text))
 
 // A CommentGroup represents a sequence of comments
 // with no other tokens and no empty lines between.
-//
 type CommentGroup struct {
 	List []*Comment // len(List) > 0
 }
@@ -273,7 +272,6 @@ func (f *FieldList) NumFields() int {
 
 // An expression is represented by a tree consisting of one
 // or more of the following concrete expression nodes.
-//
 type (
 	// A BadExpr node is a placeholder for an expression containing
 	// syntax errors for which a correct expression node cannot be
@@ -417,7 +415,6 @@ type (
 
 // The direction of a channel type is indicated by a bit
 // mask including one or both of the following constants.
-//
 type ChanDir int
 
 const (
@@ -428,7 +425,6 @@ const (
 // A type is represented by a tree consisting of one
 // or more of the following type-specific expression
 // nodes.
-//
 type (
 	// An ArrayType node represents an array or slice type.
 	ArrayType struct {
@@ -549,7 +545,6 @@ func (x *ChanType) End() token.Pos      { return x.Value.End() }
 
 // exprNode() ensures that only expression/type nodes can be
 // assigned to an Expr.
-//
 func (*BadExpr) exprNode()        {}
 func (*Ident) exprNode()          {}
 func (*Ellipsis) exprNode()       {}
@@ -580,15 +575,12 @@ func (*ChanType) exprNode()      {}
 
 // NewIdent creates a new Ident without position.
 // Useful for ASTs generated by code other than the Go parser.
-//
 func NewIdent(name string) *Ident { return &Ident{token.NoPos, name, nil} }
 
 // IsExported reports whether name starts with an upper-case letter.
-//
 func IsExported(name string) bool { return token.IsExported(name) }
 
 // IsExported reports whether id starts with an upper-case letter.
-//
 func (id *Ident) IsExported() bool { return token.IsExported(id.Name) }
 
 func (id *Ident) String() string {
@@ -603,7 +595,6 @@ func (id *Ident) String() string {
 
 // A statement is represented by a tree consisting of one
 // or more of the following concrete statement nodes.
-//
 type (
 	// A BadStmt node is a placeholder for statements containing
 	// syntax errors for which no correct statement nodes can be
@@ -854,7 +845,6 @@ func (s *RangeStmt) End() token.Pos  { return s.Body.End() }
 
 // stmtNode() ensures that only statement nodes can be
 // assigned to a Stmt.
-//
 func (*BadStmt) stmtNode()        {}
 func (*DeclStmt) stmtNode()       {}
 func (*EmptyStmt) stmtNode()      {}
@@ -882,7 +872,6 @@ func (*RangeStmt) stmtNode()      {}
 
 // A Spec node represents a single (non-parenthesized) import,
 // constant, type, or variable declaration.
-//
 type (
 	// The Spec type stands for any of *ImportSpec, *ValueSpec, and *TypeSpec.
 	Spec interface {
@@ -952,13 +941,11 @@ func (s *TypeSpec) End() token.Pos { return s.Type.End() }
 
 // specNode() ensures that only spec nodes can be
 // assigned to a Spec.
-//
 func (*ImportSpec) specNode() {}
 func (*ValueSpec) specNode()  {}
 func (*TypeSpec) specNode()   {}
 
 // A declaration is represented by one of the following declaration nodes.
-//
 type (
 	// A BadDecl node is a placeholder for a declaration containing
 	// syntax errors for which a correct declaration node cannot be
@@ -1020,7 +1007,6 @@ func (d *FuncDecl) End() token.Pos {
 
 // declNode() ensures that only declaration nodes can be
 // assigned to a Decl.
-//
 func (*BadDecl) declNode()  {}
 func (*GenDecl) declNode()  {}
 func (*FuncDecl) declNode() {}
@@ -1046,7 +1032,6 @@ func (*FuncDecl) declNode() {}
 // interpretation of the syntax tree by the manipulating program: Except for Doc
 // and Comment comments directly associated with nodes, the remaining comments
 // are "free-floating" (see also issues #18593, #20744).
-//
 type File struct {
 	Doc        *CommentGroup   // associated documentation; or nil
 	Package    token.Pos       // position of "package" keyword
@@ -1068,7 +1053,6 @@ func (f *File) End() token.Pos {
 
 // A Package node represents a set of source files
 // collectively building a Go package.
-//
 type Package struct {
 	Name    string             // package name
 	Scope   *Scope             // package scope across all files
diff --git a/src/go/ast/commentmap.go b/src/go/ast/commentmap.go
index 5161ea70b7..9f81493f64 100644
--- a/src/go/ast/commentmap.go
+++ b/src/go/ast/commentmap.go
@@ -18,7 +18,6 @@ func (a byPos) Less(i, j int) bool { return a[i].Pos() < a[j].Pos() }
 func (a byPos) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
 
 // sortComments sorts the list of comment groups in source order.
-//
 func sortComments(list []*CommentGroup) {
 	// TODO(gri): Does it make sense to check for sorted-ness
 	//            first (because we know that sorted-ness is
@@ -31,7 +30,6 @@ func sortComments(list []*CommentGroup) {
 // A CommentMap maps an AST node to a list of comment groups
 // associated with it. See NewCommentMap for a description of
 // the association.
-//
 type CommentMap map[Node][]*CommentGroup
 
 func (cmap CommentMap) addComment(n Node, c *CommentGroup) {
@@ -54,7 +52,6 @@ func (a byInterval) Less(i, j int) bool {
 func (a byInterval) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
 
 // nodeList returns the list of nodes of the AST n in source order.
-//
 func nodeList(n Node) []Node {
 	var list []Node
 	Inspect(n, func(n Node) bool {
@@ -75,7 +72,6 @@ func nodeList(n Node) []Node {
 }
 
 // A commentListReader helps iterating through a list of comment groups.
-//
 type commentListReader struct {
 	fset     *token.FileSet
 	list     []*CommentGroup
@@ -99,12 +95,10 @@ func (r *commentListReader) next() {
 
 // A nodeStack keeps track of nested nodes.
 // A node lower on the stack lexically contains the nodes higher on the stack.
-//
 type nodeStack []Node
 
 // push pops all nodes that appear lexically before n
 // and then pushes n on the stack.
-//
 func (s *nodeStack) push(n Node) {
 	s.pop(n.Pos())
 	*s = append((*s), n)
@@ -113,7 +107,6 @@ func (s *nodeStack) push(n Node) {
 // pop pops all nodes that appear lexically before pos
 // (i.e., whose lexical extent has ended before or at pos).
 // It returns the last node popped.
-//
 func (s *nodeStack) pop(pos token.Pos) (top Node) {
 	i := len(*s)
 	for i > 0 && (*s)[i-1].End() <= pos {
@@ -139,7 +132,6 @@ func (s *nodeStack) pop(pos token.Pos) (top Node) {
 // node possible: For instance, if the comment is a line comment
 // trailing an assignment, the comment is associated with the entire
 // assignment rather than just the last operand in the assignment.
-//
 func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) CommentMap {
 	if len(comments) == 0 {
 		return nil // no comments to map
@@ -242,7 +234,6 @@ func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) Com
 // Update replaces an old node in the comment map with the new node
 // and returns the new node. Comments that were associated with the
 // old node are associated with the new node.
-//
 func (cmap CommentMap) Update(old, new Node) Node {
 	if list := cmap[old]; len(list) > 0 {
 		delete(cmap, old)
@@ -254,7 +245,6 @@ func (cmap CommentMap) Update(old, new Node) Node {
 // Filter returns a new comment map consisting of only those
 // entries of cmap for which a corresponding node exists in
 // the AST specified by node.
-//
 func (cmap CommentMap) Filter(node Node) CommentMap {
 	umap := make(CommentMap)
 	Inspect(node, func(n Node) bool {
@@ -268,7 +258,6 @@ func (cmap CommentMap) Filter(node Node) CommentMap {
 
 // Comments returns the list of comment groups in the comment map.
 // The result is sorted in source order.
-//
 func (cmap CommentMap) Comments() []*CommentGroup {
 	list := make([]*CommentGroup, 0, len(cmap))
 	for _, e := range cmap {
diff --git a/src/go/ast/commentmap_test.go b/src/go/ast/commentmap_test.go
index 38c62b01ab..281467c41f 100644
--- a/src/go/ast/commentmap_test.go
+++ b/src/go/ast/commentmap_test.go
@@ -73,7 +73,6 @@ func f3() {
 
 // res maps a key of the form "line number: node type"
 // to the associated comments' text.
-//
 var res = map[string]string{
 	" 5: *ast.File":       "the very first comment\npackage p\n",
 	" 5: *ast.Ident":      " the name is p\n",
diff --git a/src/go/ast/filter.go b/src/go/ast/filter.go
index c398e6e603..2fc73c4b99 100644
--- a/src/go/ast/filter.go
+++ b/src/go/ast/filter.go
@@ -24,7 +24,6 @@ func exportFilter(name string) bool {
 // stripped. The File.Comments list is not changed.
 //
 // FileExports reports whether there are exported declarations.
-//
 func FileExports(src *File) bool {
 	return filterFile(src, exportFilter, true)
 }
@@ -35,7 +34,6 @@ func FileExports(src *File) bool {
 //
 // PackageExports reports whether there are exported declarations;
 // it returns false otherwise.
-//
 func PackageExports(pkg *Package) bool {
 	return filterPackage(pkg, exportFilter, true)
 }
@@ -59,7 +57,6 @@ func filterIdentList(list []*Ident, f Filter) []*Ident {
 // fieldName assumes that x is the type of an anonymous field and
 // returns the corresponding field name. If x is not an acceptable
 // anonymous field, the result is nil.
-//
 func fieldName(x Expr) *Ident {
 	switch t := x.(type) {
 	case *Ident:
@@ -229,7 +226,6 @@ func filterSpecList(list []Spec, f Filter, export bool) []Spec {
 //
 // FilterDecl reports whether there are any declared names left after
 // filtering.
-//
 func FilterDecl(decl Decl, f Filter) bool {
 	return filterDecl(decl, f, false)
 }
@@ -254,7 +250,6 @@ func filterDecl(decl Decl, f Filter, export bool) bool {
 //
 // FilterFile reports whether there are any top-level declarations
 // left after filtering.
-//
 func FilterFile(src *File, f Filter) bool {
 	return filterFile(src, f, false)
 }
@@ -281,7 +276,6 @@ func filterFile(src *File, f Filter, export bool) bool {
 //
 // FilterPackage reports whether there are any top-level declarations
 // left after filtering.
-//
 func FilterPackage(pkg *Package, f Filter) bool {
 	return filterPackage(pkg, f, false)
 }
@@ -315,7 +309,6 @@ const (
 // nameOf returns the function (foo) or method name (foo.bar) for
 // the given function declaration. If the AST is incorrect for the
 // receiver, it assumes a function instead.
-//
 func nameOf(f *FuncDecl) string {
 	if r := f.Recv; r != nil && len(r.List) == 1 {
 		// looks like a correct receiver declaration
@@ -335,12 +328,10 @@ func nameOf(f *FuncDecl) string {
 
 // separator is an empty //-style comment that is interspersed between
 // different comment groups when they are concatenated into a single group
-//
 var separator = &Comment{token.NoPos, "//"}
 
 // MergePackageFiles creates a file AST by merging the ASTs of the
 // files belonging to a package. The mode flags control merging behavior.
-//
 func MergePackageFiles(pkg *Package, mode MergeMode) *File {
 	// Count the number of package docs, comments and declarations across
 	// all package files. Also, compute sorted list of filenames, so that
diff --git a/src/go/ast/filter_test.go b/src/go/ast/filter_test.go
index 9fd86cb467..86f396bb8b 100644
--- a/src/go/ast/filter_test.go
+++ b/src/go/ast/filter_test.go
@@ -38,7 +38,6 @@ func (x *t2) f2() {}
 // of one without, and it favors duplicate entries appearing
 // later in the source over ones appearing earlier. This is why
 // (*t2).f2 is kept and t2.f2 is eliminated in this test case.
-//
 const golden = `package p
 
 type t1 struct{}
diff --git a/src/go/ast/resolve.go b/src/go/ast/resolve.go
index 126a27b18c..970aa88ad6 100644
--- a/src/go/ast/resolve.go
+++ b/src/go/ast/resolve.go
@@ -70,7 +70,6 @@ type Importer func(imports map[string]*Object, path string) (pkg *Object, err er
 // belong to different packages, one package name is selected and files with
 // different package names are reported and then ignored.
 // The result is a package node and a scanner.ErrorList if there were errors.
-//
 func NewPackage(fset *token.FileSet, files map[string]*File, importer Importer, universe *Scope) (*Package, error) {
 	var p pkgBuilder
 	p.fset = fset
diff --git a/src/go/ast/scope.go b/src/go/ast/scope.go
index d24a5f0e00..02691f8e54 100644
--- a/src/go/ast/scope.go
+++ b/src/go/ast/scope.go
@@ -15,7 +15,6 @@ import (
 // A Scope maintains the set of named language entities declared
 // in the scope and a link to the immediately surrounding (outer)
 // scope.
-//
 type Scope struct {
 	Outer   *Scope
 	Objects map[string]*Object
@@ -30,7 +29,6 @@ func NewScope(outer *Scope) *Scope {
 // Lookup returns the object with the given name if it is
 // found in scope s, otherwise it returns nil. Outer scopes
 // are ignored.
-//
 func (s *Scope) Lookup(name string) *Object {
 	return s.Objects[name]
 }
@@ -39,7 +37,6 @@ func (s *Scope) Lookup(name string) *Object {
 // If the scope already contains an object alt with the same name,
 // Insert leaves the scope unchanged and returns alt. Otherwise
 // it inserts obj and returns nil.
-//
 func (s *Scope) Insert(obj *Object) (alt *Object) {
 	if alt = s.Objects[obj.Name]; alt == nil {
 		s.Objects[obj.Name] = obj
@@ -72,7 +69,6 @@ func (s *Scope) String() string {
 //	Kind    Data type         Data value
 //	Pkg     *Scope            package scope
 //	Con     int               iota for the respective declaration
-//
 type Object struct {
 	Kind ObjKind
 	Name string // declared name
diff --git a/src/go/ast/walk.go b/src/go/ast/walk.go
index 16b15f11f2..a293c99a10 100644
--- a/src/go/ast/walk.go
+++ b/src/go/ast/walk.go
@@ -47,7 +47,6 @@ func walkDeclList(v Visitor, list []Decl) {
 // v.Visit(node) is not nil, Walk is invoked recursively with visitor
 // w for each of the non-nil children of node, followed by a call of
 // w.Visit(nil).
-//
 func Walk(v Visitor, node Node) {
 	if v = v.Visit(node); v == nil {
 		return
@@ -394,7 +393,6 @@ func (f inspector) Visit(node Node) Visitor {
 // f(node); node must not be nil. If f returns true, Inspect invokes f
 // recursively for each of the non-nil children of node, followed by a
 // call of f(nil).
-//
 func Inspect(node Node, f func(Node) bool) {
 	Walk(inspector(f), node)
 }
diff --git a/src/go/build/build.go b/src/go/build/build.go
index cc2585b677..2666b8acb7 100644
--- a/src/go/build/build.go
+++ b/src/go/build/build.go
@@ -534,7 +534,6 @@ func nameExt(name string) string {
 //
 // If an error occurs, Import returns a non-nil error and a non-nil
 // *Package containing partial information.
-//
 func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Package, error) {
 	p := &Package{
 		ImportPath: path,
@@ -1813,7 +1812,6 @@ func safeCgoName(s string) bool {
 // Would be parsed as:
 //
 //     []string{"a", "b:c d", "ef", `g"`}
-//
 func splitQuoted(s string) (r []string, err error) {
 	var args []string
 	arg := make([]rune, len(s))
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index 5794e3d25e..c4fb2fe0b4 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -66,7 +66,6 @@ import (
 //
 // All-caps names are pseudo-names for specific points
 // in the dependency lattice.
-//
 var depsRules = `
 	# No dependencies allowed for any of these packages.
 	NONE
diff --git a/src/go/constant/value.go b/src/go/constant/value.go
index 544801bd70..3daa4c2860 100644
--- a/src/go/constant/value.go
+++ b/src/go/constant/value.go
@@ -578,7 +578,6 @@ func Float64Val(x Value) (float64, bool) {
 //    Int                int64 or *big.Int
 //    Float              *big.Float or *big.Rat
 //    everything else    nil
-//
 func Val(x Value) any {
 	switch x := x.(type) {
 	case boolVal:
@@ -609,7 +608,6 @@ func Val(x Value) any {
 //    *big.Float       Float
 //    *big.Rat         Float
 //    anything else    Unknown
-//
 func Make(x any) Value {
 	switch x := x.(type) {
 	case bool:
@@ -945,7 +943,6 @@ func is63bit(x int64) bool {
 // The operation must be defined for the operand.
 // If prec > 0 it specifies the ^ (xor) result size in bits.
 // If y is Unknown, the result is Unknown.
-//
 func UnaryOp(op token.Token, y Value, prec uint) Value {
 	switch op {
 	case token.ADD:
@@ -1035,7 +1032,6 @@ func ord(x Value) int {
 // smallest complexity for two values x and y. If one of them is
 // numeric, both of them must be numeric. If one of them is Unknown
 // or invalid (say, nil) both results are that value.
-//
 func match(x, y Value) (_, _ Value) {
 	switch ox, oy := ord(x), ord(y); {
 	case ox < oy:
@@ -1092,7 +1088,6 @@ func match0(x, y Value) (_, _ Value) {
 // To force integer division of Int operands, use op == token.QUO_ASSIGN
 // instead of token.QUO; the result is guaranteed to be Int in this case.
 // Division by zero leads to a run-time panic.
-//
 func BinaryOp(x_ Value, op token.Token, y_ Value) Value {
 	x, y := match(x_, y_)
 
@@ -1272,7 +1267,6 @@ func quo(x, y Value) Value { return BinaryOp(x, token.QUO, y) }
 // Shift returns the result of the shift expression x op s
 // with op == token.SHL or token.SHR (<< or >>). x must be
 // an Int or an Unknown. If x is Unknown, the result is x.
-//
 func Shift(x Value, op token.Token, s uint) Value {
 	switch x := x.(type) {
 	case unknownVal:
@@ -1328,7 +1322,6 @@ func cmpZero(x int, op token.Token) bool {
 // The comparison must be defined for the operands.
 // If one of the operands is Unknown, the result is
 // false.
-//
 func Compare(x_ Value, op token.Token, y_ Value) bool {
 	x, y := match(x_, y_)
 
diff --git a/src/go/doc/doc.go b/src/go/doc/doc.go
index 5ab854d084..f0c1b5dd32 100644
--- a/src/go/doc/doc.go
+++ b/src/go/doc/doc.go
@@ -114,7 +114,6 @@ const (
 // New takes ownership of the AST pkg and may edit or overwrite it.
 // To have the Examples fields populated, use NewFromFiles and include
 // the package's _test.go files.
-//
 func New(pkg *ast.Package, importPath string, mode Mode) *Package {
 	var r reader
 	r.readPackage(pkg, mode)
@@ -156,7 +155,6 @@ func New(pkg *ast.Package, importPath string, mode Mode) *Package {
 //
 // NewFromFiles takes ownership of the AST files and may edit them,
 // unless the PreserveAST Mode bit is on.
-//
 func NewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts ...any) (*Package, error) {
 	// Check for invalid API usage.
 	if fset == nil {
diff --git a/src/go/doc/example.go b/src/go/doc/example.go
index 0a880cdefb..fcd59e100a 100644
--- a/src/go/doc/example.go
+++ b/src/go/doc/example.go
@@ -462,7 +462,6 @@ func lastComment(b *ast.BlockStmt, c []*ast.CommentGroup) (i int, last *ast.Comm
 // 	  or Foo (with a "bar" suffix).
 //
 // Examples with malformed names are not associated with anything.
-//
 func classifyExamples(p *Package, examples []*Example) {
 	if len(examples) == 0 {
 		return
diff --git a/src/go/doc/exports.go b/src/go/doc/exports.go
index 671c622205..655e889293 100644
--- a/src/go/doc/exports.go
+++ b/src/go/doc/exports.go
@@ -13,7 +13,6 @@ import (
 
 // filterIdentList removes unexported names from list in place
 // and returns the resulting list.
-//
 func filterIdentList(list []*ast.Ident) []*ast.Ident {
 	j := 0
 	for _, x := range list {
@@ -69,7 +68,6 @@ func updateIdentList(list []*ast.Ident) (hasExported bool) {
 }
 
 // hasExportedName reports whether list contains any exported names.
-//
 func hasExportedName(list []*ast.Ident) bool {
 	for _, x := range list {
 		if x.IsExported() {
@@ -106,7 +104,6 @@ func removeAnonymousField(name string, ityp *ast.InterfaceType) {
 // in place and reports whether fields were removed. Anonymous fields are
 // recorded with the parent type. filterType is called with the types of
 // all remaining fields.
-//
 func (r *reader) filterFieldList(parent *namedType, fields *ast.FieldList, ityp *ast.InterfaceType) (removedFields bool) {
 	if fields == nil {
 		return
@@ -159,7 +156,6 @@ func (r *reader) filterFieldList(parent *namedType, fields *ast.FieldList, ityp
 }
 
 // filterParamList applies filterType to each parameter type in fields.
-//
 func (r *reader) filterParamList(fields *ast.FieldList) {
 	if fields != nil {
 		for _, f := range fields.List {
@@ -171,7 +167,6 @@ func (r *reader) filterParamList(fields *ast.FieldList) {
 // filterType strips any unexported struct fields or method types from typ
 // in place. If fields (or methods) have been removed, the corresponding
 // struct or interface type has the Incomplete field set to true.
-//
 func (r *reader) filterType(parent *namedType, typ ast.Expr) {
 	switch t := typ.(type) {
 	case *ast.Ident:
@@ -255,7 +250,6 @@ func (r *reader) filterSpec(spec ast.Spec) bool {
 // copyConstType returns a copy of typ with position pos.
 // typ must be a valid constant type.
 // In practice, only (possibly qualified) identifiers are possible.
-//
 func copyConstType(typ ast.Expr, pos token.Pos) ast.Expr {
 	switch typ := typ.(type) {
 	case *ast.Ident:
@@ -318,7 +312,6 @@ func (r *reader) filterDecl(decl ast.Decl) bool {
 }
 
 // fileExports removes unexported declarations from src in place.
-//
 func (r *reader) fileExports(src *ast.File) {
 	j := 0
 	for _, d := range src.Decls {
diff --git a/src/go/doc/filter.go b/src/go/doc/filter.go
index 9904da150e..f8d3e1fca2 100644
--- a/src/go/doc/filter.go
+++ b/src/go/doc/filter.go
@@ -97,7 +97,6 @@ func filterTypes(a []*Type, f Filter) []*Type {
 
 // Filter eliminates documentation for names that don't pass through the filter f.
 // TODO(gri): Recognize "Type.Method" as a name.
-//
 func (p *Package) Filter(f Filter) {
 	p.Consts = filterValues(p.Consts, f)
 	p.Vars = filterValues(p.Vars, f)
diff --git a/src/go/doc/reader.go b/src/go/doc/reader.go
index d9e721d01b..c591059e5c 100644
--- a/src/go/doc/reader.go
+++ b/src/go/doc/reader.go
@@ -21,12 +21,10 @@ import (
 
 // A methodSet describes a set of methods. Entries where Decl == nil are conflict
 // entries (more than one method with the same name at the same embedding level).
-//
 type methodSet map[string]*Func
 
 // recvString returns a string representation of recv of the form "T", "*T",
 // "T[A, ...]", "*T[A, ...]" or "BADRECV" (if not a proper receiver type).
-//
 func recvString(recv ast.Expr) string {
 	switch t := recv.(type) {
 	case *ast.Ident:
@@ -65,7 +63,6 @@ func recvParam(p ast.Expr) string {
 // If there are multiple f's with the same name, set keeps the first
 // one with documentation; conflicts are ignored. The boolean
 // specifies whether to leave the AST untouched.
-//
 func (mset methodSet) set(f *ast.FuncDecl, preserveAST bool) {
 	name := f.Name.Name
 	if g := mset[name]; g != nil && g.Doc != "" {
@@ -101,7 +98,6 @@ func (mset methodSet) set(f *ast.FuncDecl, preserveAST bool) {
 // add adds method m to the method set; m is ignored if the method set
 // already contains a method with the same name at the same or a higher
 // level than m.
-//
 func (mset methodSet) add(m *Func) {
 	old := mset[m.Name]
 	if old == nil || m.Level < old.Level {
@@ -122,7 +118,6 @@ func (mset methodSet) add(m *Func) {
 
 // baseTypeName returns the name of the base type of x (or "")
 // and whether the type is imported or not.
-//
 func baseTypeName(x ast.Expr) (name string, imported bool) {
 	switch t := x.(type) {
 	case *ast.Ident:
@@ -151,7 +146,6 @@ type embeddedSet map[*namedType]bool
 // A namedType represents a named unqualified (package local, or possibly
 // predeclared) type. The namedType for a type name is always found via
 // reader.lookupType.
-//
 type namedType struct {
 	doc  string       // doc comment for type
 	name string       // type name
@@ -176,7 +170,6 @@ type namedType struct {
 // in the respective AST nodes so that they are not printed
 // twice (once when printing the documentation and once when
 // printing the corresponding AST node).
-//
 type reader struct {
 	mode Mode
 
@@ -206,7 +199,6 @@ func (r *reader) isVisible(name string) bool {
 // If the base type has not been encountered yet, a new
 // type with the given name but no associated declaration
 // is added to the type map.
-//
 func (r *reader) lookupType(name string) *namedType {
 	if name == "" || name == "_" {
 		return nil // no type docs for anonymous types
@@ -229,7 +221,6 @@ func (r *reader) lookupType(name string) *namedType {
 // anonymous field in the parent type. If the field is imported
 // (qualified name) or the parent is nil, the field is ignored.
 // The function returns the field name.
-//
 func (r *reader) recordAnonymousField(parent *namedType, fieldType ast.Expr) (fname string) {
 	fname, imp := baseTypeName(fieldType)
 	if parent == nil || imp {
@@ -273,7 +264,6 @@ func specNames(specs []ast.Spec) []string {
 }
 
 // readValue processes a const or var declaration.
-//
 func (r *reader) readValue(decl *ast.GenDecl) {
 	// determine if decl should be associated with a type
 	// Heuristic: For each typed entry, determine the type name, if any.
@@ -347,7 +337,6 @@ func (r *reader) readValue(decl *ast.GenDecl) {
 }
 
 // fields returns a struct's fields or an interface's methods.
-//
 func fields(typ ast.Expr) (list []*ast.Field, isStruct bool) {
 	var fields *ast.FieldList
 	switch t := typ.(type) {
@@ -364,7 +353,6 @@ func fields(typ ast.Expr) (list []*ast.Field, isStruct bool) {
 }
 
 // readType processes a type declaration.
-//
 func (r *reader) readType(decl *ast.GenDecl, spec *ast.TypeSpec) {
 	typ := r.lookupType(spec.Name.Name)
 	if typ == nil {
@@ -400,13 +388,11 @@ func (r *reader) readType(decl *ast.GenDecl, spec *ast.TypeSpec) {
 }
 
 // isPredeclared reports whether n denotes a predeclared type.
-//
 func (r *reader) isPredeclared(n string) bool {
 	return predeclaredTypes[n] && r.types[n] == nil
 }
 
 // readFunc processes a func or method declaration.
-//
 func (r *reader) readFunc(fun *ast.FuncDecl) {
 	// strip function body if requested.
 	if r.mode&PreserveAST == 0 {
@@ -500,7 +486,6 @@ var (
 )
 
 // readNote collects a single note from a sequence of comments.
-//
 func (r *reader) readNote(list []*ast.Comment) {
 	text := (&ast.CommentGroup{List: list}).Text()
 	if m := noteMarkerRx.FindStringSubmatchIndex(text); m != nil {
@@ -526,7 +511,6 @@ func (r *reader) readNote(list []*ast.Comment) {
 // and is followed by the note body (e.g., "// BUG(gri): fix this").
 // The note ends at the end of the comment group or at the start of
 // another note in the same comment group, whichever comes first.
-//
 func (r *reader) readNotes(comments []*ast.CommentGroup) {
 	for _, group := range comments {
 		i := -1 // comment index of most recent note start, valid if >= 0
@@ -546,7 +530,6 @@ func (r *reader) readNotes(comments []*ast.CommentGroup) {
 }
 
 // readFile adds the AST for a source file to the reader.
-//
 func (r *reader) readFile(src *ast.File) {
 	// add package documentation
 	if src.Doc != nil {
@@ -696,7 +679,6 @@ func customizeRecv(f *Func, recvTypeName string, embeddedIsPtr bool, level int)
 }
 
 // collectEmbeddedMethods collects the embedded methods of typ in mset.
-//
 func (r *reader) collectEmbeddedMethods(mset methodSet, typ *namedType, recvTypeName string, embeddedIsPtr bool, level int, visited embeddedSet) {
 	visited[typ] = true
 	for embedded, isPtr := range typ.embedded {
@@ -720,7 +702,6 @@ func (r *reader) collectEmbeddedMethods(mset methodSet, typ *namedType, recvType
 }
 
 // computeMethodSets determines the actual method sets for each type encountered.
-//
 func (r *reader) computeMethodSets() {
 	for _, t := range r.types {
 		// collect embedded methods for t
@@ -746,7 +727,6 @@ func (r *reader) computeMethodSets() {
 // types that have no declaration. Instead, these functions and methods
 // are shown at the package level. It also removes types with missing
 // declarations or which are not visible.
-//
 func (r *reader) cleanupTypes() {
 	for _, t := range r.types {
 		visible := r.isVisible(t.name)
@@ -813,7 +793,6 @@ func sortedKeys(m map[string]int) []string {
 }
 
 // sortingName returns the name to use when sorting d into place.
-//
 func sortingName(d *ast.GenDecl) string {
 	if len(d.Specs) == 1 {
 		if s, ok := d.Specs[0].(*ast.ValueSpec); ok {
@@ -906,7 +885,6 @@ func sortedFuncs(m methodSet, allMethods bool) []*Func {
 
 // noteBodies returns a list of note body strings given a list of notes.
 // This is only used to populate the deprecated Package.Bugs field.
-//
 func noteBodies(notes []*Note) []string {
 	var list []string
 	for _, n := range notes {
diff --git a/src/go/doc/synopsis.go b/src/go/doc/synopsis.go
index 3fa1616cd1..ca607cc4e5 100644
--- a/src/go/doc/synopsis.go
+++ b/src/go/doc/synopsis.go
@@ -12,7 +12,6 @@ import (
 // firstSentenceLen returns the length of the first sentence in s.
 // The sentence ends after the first period followed by space and
 // not preceded by exactly one uppercase letter.
-//
 func firstSentenceLen(s string) int {
 	var ppp, pp, p rune
 	for i, q := range s {
@@ -64,7 +63,6 @@ func clean(s string, flags int) string {
 // has no \n, \r, or \t characters and uses only single spaces between
 // words. If s starts with any of the IllegalPrefixes, the result
 // is the empty string.
-//
 func Synopsis(s string) string {
 	s = clean(s[0:firstSentenceLen(s)], 0)
 	for _, prefix := range IllegalPrefixes {
diff --git a/src/go/format/benchmark_test.go b/src/go/format/benchmark_test.go
index ac19aa3bf5..d434d6f549 100644
--- a/src/go/format/benchmark_test.go
+++ b/src/go/format/benchmark_test.go
@@ -31,7 +31,6 @@ var debug = flag.Bool("debug", false, "write .src files containing formatting in
 // 	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
 // 	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
 // 	...
-//
 func array1(buf *bytes.Buffer, n int) {
 	buf.WriteString("var _ = [...]byte{\n")
 	for i := 0; i < n; {
diff --git a/src/go/format/format.go b/src/go/format/format.go
index ea8dd20823..fb87e84a4e 100644
--- a/src/go/format/format.go
+++ b/src/go/format/format.go
@@ -50,7 +50,6 @@ const parserMode = parser.ParseComments
 //
 // The function may return early (before the entire result is written)
 // and return a formatting error, for instance due to an incorrect AST.
-//
 func Node(dst io.Writer, fset *token.FileSet, node any) error {
 	// Determine if we have a complete source file (file != nil).
 	var file *ast.File
@@ -99,7 +98,6 @@ func Node(dst io.Writer, fset *token.FileSet, node any) error {
 // is applied to the result (such that it has the same leading and trailing
 // space as src), and the result is indented by the same amount as the first
 // line of src containing code. Imports are not sorted for partial source files.
-//
 func Source(src []byte) ([]byte, error) {
 	fset := token.NewFileSet()
 	file, sourceAdj, indentAdj, err := parse(fset, "", src, true)
diff --git a/src/go/internal/gccgoimporter/parser.go b/src/go/internal/gccgoimporter/parser.go
index 48335fa6d8..10402fe43e 100644
--- a/src/go/internal/gccgoimporter/parser.go
+++ b/src/go/internal/gccgoimporter/parser.go
@@ -187,7 +187,6 @@ func (p *parser) parseQualifiedNameStr(unquotedName string) (pkgpath, name strin
 // getPkg returns the package for a given path. If the package is
 // not found but we have a package name, create the package and
 // add it to the p.imports map.
-//
 func (p *parser) getPkg(pkgpath, name string) *types.Package {
 	// package unsafe is not in the imports map - handle explicitly
 	if pkgpath == "unsafe" {
@@ -934,7 +933,6 @@ func lookupBuiltinType(typ int) types.Type {
 // Type = "<" "type" ( "-" int | int [ TypeSpec ] ) ">" .
 //
 // parseType updates the type map to t for all type numbers n.
-//
 func (p *parser) parseType(pkg *types.Package, n ...any) types.Type {
 	p.expect('<')
 	t, _ := p.parseTypeAfterAngle(pkg, n...)
diff --git a/src/go/internal/gcimporter/exportdata.go b/src/go/internal/gcimporter/exportdata.go
index c12e459c3d..43e505b47b 100644
--- a/src/go/internal/gcimporter/exportdata.go
+++ b/src/go/internal/gcimporter/exportdata.go
@@ -40,7 +40,6 @@ func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
 // file by reading from it. The reader must be positioned at the
 // start of the file before calling this function. The hdr result
 // is the string before the export data, either "$$" or "$$B".
-//
 func FindExportData(r *bufio.Reader) (hdr string, err error) {
 	// Read first line to make sure this is an object file.
 	line, err := r.ReadSlice('\n')
diff --git a/src/go/internal/gcimporter/gcimporter.go b/src/go/internal/gcimporter/gcimporter.go
index 73cf6334fd..9ed5e0c5e8 100644
--- a/src/go/internal/gcimporter/gcimporter.go
+++ b/src/go/internal/gcimporter/gcimporter.go
@@ -27,7 +27,6 @@ var pkgExts = [...]string{".a", ".o"}
 // the build.Default build.Context). A relative srcDir is interpreted
 // relative to the current working directory.
 // If no file was found, an empty filename is returned.
-//
 func FindPkg(path, srcDir string) (filename, id string) {
 	if path == "" {
 		return
@@ -83,7 +82,6 @@ func FindPkg(path, srcDir string) (filename, id string) {
 // Import imports a gc-generated package given its import path and srcDir, adds
 // the corresponding package object to the packages map, and returns the object.
 // The packages map must contain all packages already imported.
-//
 func Import(fset *token.FileSet, packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) {
 	var rc io.ReadCloser
 	var id string
diff --git a/src/go/parser/error_test.go b/src/go/parser/error_test.go
index bedfc265b5..c3a8ec6ad8 100644
--- a/src/go/parser/error_test.go
+++ b/src/go/parser/error_test.go
@@ -64,12 +64,10 @@ func getPos(fset *token.FileSet, filename string, offset int) token.Pos {
 // The special form /* ERROR HERE "rx" */ must be used for error
 // messages that appear immediately after a token, rather than at
 // a token's position.
-//
 var errRx = regexp.MustCompile(`^/\* *ERROR *(HERE)? *"([^"]*)" *\*/$`)
 
 // expectedErrors collects the regular expressions of ERROR comments found
 // in files and returns them as a map of error positions to error messages.
-//
 func expectedErrors(fset *token.FileSet, filename string, src []byte) map[token.Pos]string {
 	errors := make(map[token.Pos]string)
 
@@ -116,7 +114,6 @@ func expectedErrors(fset *token.FileSet, filename string, src []byte) map[token.
 
 // compareErrors compares the map of expected error messages with the list
 // of found errors and reports discrepancies.
-//
 func compareErrors(t *testing.T, fset *token.FileSet, expected map[token.Pos]string, found scanner.ErrorList) {
 	t.Helper()
 	for _, error := range found {
diff --git a/src/go/parser/interface.go b/src/go/parser/interface.go
index e4f8c281ea..e3468f481f 100644
--- a/src/go/parser/interface.go
+++ b/src/go/parser/interface.go
@@ -21,7 +21,6 @@ import (
 // If src != nil, readSource converts src to a []byte if possible;
 // otherwise it returns an error. If src == nil, readSource returns
 // the result of reading the file specified by filename.
-//
 func readSource(filename string, src any) ([]byte, error) {
 	if src != nil {
 		switch s := src.(type) {
@@ -45,7 +44,6 @@ func readSource(filename string, src any) ([]byte, error) {
 // A Mode value is a set of flags (or 0).
 // They control the amount of source code parsed and other optional
 // parser functionality.
-//
 type Mode uint
 
 const (
@@ -81,7 +79,6 @@ const (
 // errors were found, the result is a partial AST (with ast.Bad* nodes
 // representing the fragments of erroneous source code). Multiple errors
 // are returned via a scanner.ErrorList which is sorted by source position.
-//
 func ParseFile(fset *token.FileSet, filename string, src any, mode Mode) (f *ast.File, err error) {
 	if fset == nil {
 		panic("parser.ParseFile: no token.FileSet provided (fset == nil)")
@@ -136,7 +133,6 @@ func ParseFile(fset *token.FileSet, filename string, src any, mode Mode) (f *ast
 // If the directory couldn't be read, a nil map and the respective error are
 // returned. If a parse error occurred, a non-nil but incomplete map and the
 // first error encountered are returned.
-//
 func ParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, mode Mode) (pkgs map[string]*ast.Package, first error) {
 	list, err := os.ReadDir(path)
 	if err != nil {
@@ -187,7 +183,6 @@ func ParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, m
 // errors were found, the result is a partial AST (with ast.Bad* nodes
 // representing the fragments of erroneous source code). Multiple errors
 // are returned via a scanner.ErrorList which is sorted by source position.
-//
 func ParseExprFrom(fset *token.FileSet, filename string, src any, mode Mode) (expr ast.Expr, err error) {
 	if fset == nil {
 		panic("parser.ParseExprFrom: no token.FileSet provided (fset == nil)")
@@ -232,7 +227,6 @@ func ParseExprFrom(fset *token.FileSet, filename string, src any, mode Mode) (ex
 // If syntax errors were found, the result is a partial AST (with ast.Bad* nodes
 // representing the fragments of erroneous source code). Multiple errors are
 // returned via a scanner.ErrorList which is sorted by source position.
-//
 func ParseExpr(x string) (ast.Expr, error) {
 	return ParseExprFrom(token.NewFileSet(), "", []byte(x), 0)
 }
diff --git a/src/go/parser/parser.go b/src/go/parser/parser.go
index 51a3c3e67f..3eb00e9446 100644
--- a/src/go/parser/parser.go
+++ b/src/go/parser/parser.go
@@ -154,7 +154,6 @@ func (p *parser) consumeComment() (comment *ast.Comment, endline int) {
 // comments list, and return it together with the line at which
 // the last comment in the group ends. A non-comment token or n
 // empty lines terminate a comment group.
-//
 func (p *parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline int) {
 	var list []*ast.Comment
 	endline = p.file.Line(p.pos)
@@ -185,7 +184,6 @@ func (p *parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline
 //
 // Lead and line comments may be considered documentation that is
 // stored in the AST.
-//
 func (p *parser) next() {
 	p.leadComment = nil
 	p.lineComment = nil
@@ -288,7 +286,6 @@ func (p *parser) expect2(tok token.Token) (pos token.Pos) {
 
 // expectClosing is like expect but provides a better error message
 // for the common case of a missing comma before a newline.
-//
 func (p *parser) expectClosing(tok token.Token, context string) token.Pos {
 	if p.tok != tok && p.tok == token.SEMICOLON && p.lit == "\n" {
 		p.error(p.pos, "missing ',' before newline in "+context)
@@ -406,7 +403,6 @@ var exprEnd = map[token.Token]bool{
 // token positions are invalid due to parse errors, the resulting end position
 // may be past the file's EOF position, which would lead to panics if used
 // later on.
-//
 func (p *parser) safePos(pos token.Pos) (res token.Pos) {
 	defer func() {
 		if recover() != nil {
@@ -1349,7 +1345,6 @@ func (p *parser) parseFuncTypeOrLit() ast.Expr {
 
 // parseOperand may return an expression or a raw type (incl. array
 // types of the form [...]T. Callers must verify the result.
-//
 func (p *parser) parseOperand() ast.Expr {
 	if p.trace {
 		defer un(trace(p, "Operand"))
@@ -1640,7 +1635,6 @@ func unparen(x ast.Expr) ast.Expr {
 
 // checkExprOrType checks that x is an expression or a type
 // (and not a raw type such as [...]T).
-//
 func (p *parser) checkExprOrType(x ast.Expr) ast.Expr {
 	switch t := unparen(x).(type) {
 	case *ast.ParenExpr:
diff --git a/src/go/parser/resolver.go b/src/go/parser/resolver.go
index d66a194c12..767a5e20ad 100644
--- a/src/go/parser/resolver.go
+++ b/src/go/parser/resolver.go
@@ -188,7 +188,6 @@ var unresolved = new(ast.Object)
 // the object it denotes. If no object is found and collectUnresolved is
 // set, x is marked as unresolved and collected in the list of unresolved
 // identifiers.
-//
 func (r *resolver) resolve(ident *ast.Ident, collectUnresolved bool) {
 	if ident.Obj != nil {
 		panic(r.sprintf("%v: identifier %s already declared or resolved", ident.Pos(), ident.Name))
diff --git a/src/go/printer/nodes.go b/src/go/printer/nodes.go
index 89e8016409..f4fbde8ae6 100644
--- a/src/go/printer/nodes.go
+++ b/src/go/printer/nodes.go
@@ -44,7 +44,6 @@ import (
 // space taken up by them is not considered to reduce the number of
 // linebreaks. At the moment there is no easy way to know about
 // future (not yet interspersed) comments in this function.
-//
 func (p *printer) linebreak(line, min int, ws whiteSpace, newSection bool) (nbreaks int) {
 	n := nlimit(line - p.pos.Line)
 	if n < min {
@@ -745,7 +744,6 @@ func reduceDepth(depth int) int {
 //	3) If there are no level 4 operators or no level 5 operators, then the
 //	   cutoff is 6 (always use spaces) in Normal mode
 //	   and 4 (never use spaces) in Compact mode.
-//
 func (p *printer) binaryExpr(x *ast.BinaryExpr, prec1, cutoff, depth int) {
 	prec := x.Op.Precedence()
 	if prec < prec1 {
@@ -1259,7 +1257,6 @@ func (p *printer) controlClause(isForStmt bool, init ast.Stmt, expr ast.Expr, po
 // indentList reports whether an expression list would look better if it
 // were indented wholesale (starting with the very first element, rather
 // than starting at the first line break).
-//
 func (p *printer) indentList(list []ast.Expr) bool {
 	// Heuristic: indentList reports whether there are more than one multi-
 	// line element in the list, or if there is any element that is not
@@ -1503,7 +1500,6 @@ func (p *printer) stmt(stmt ast.Stmt, nextIsRBrace bool) {
 //	-  V          -  V          true      column must be kept
 //	-  -          -  -          false
 //	-  V          V  -          false     V is moved into T column
-//
 func keepTypeColumn(specs []ast.Spec) []bool {
 	m := make([]bool, len(specs))
 
@@ -1614,7 +1610,6 @@ func sanitizeImportPath(lit *ast.BasicLit) *ast.BasicLit {
 // The parameter n is the number of specs in the group. If doIndent is set,
 // multi-line identifier lists in the spec are indented when the first
 // linebreak is encountered.
-//
 func (p *printer) spec(spec ast.Spec, n int, doIndent bool) {
 	switch s := spec.(type) {
 	case *ast.ImportSpec:
@@ -1710,7 +1705,6 @@ func (p *printer) genDecl(d *ast.GenDecl) {
 // The result is <= maxSize if the node fits on one line with at
 // most maxSize chars and the formatted output doesn't contain
 // any control chars. Otherwise, the result is > maxSize.
-//
 func (p *printer) nodeSize(n ast.Node, maxSize int) (size int) {
 	// nodeSize invokes the printer, which may invoke nodeSize
 	// recursively. For deep composite literal nests, this can
@@ -1784,7 +1778,6 @@ func (p *printer) bodySize(b *ast.BlockStmt, maxSize int) int {
 // the block is printed on the current line, without line breaks, spaced from the header
 // by sep. Otherwise the block's opening "{" is printed on the current line, followed by
 // lines for the block's statements and its closing "}".
-//
 func (p *printer) funcBody(headerSize int, sep whiteSpace, b *ast.BlockStmt) {
 	if b == nil {
 		return
diff --git a/src/go/printer/printer.go b/src/go/printer/printer.go
index e4679b0021..5014f59ab5 100644
--- a/src/go/printer/printer.go
+++ b/src/go/printer/printer.go
@@ -151,14 +151,12 @@ func (p *printer) nextComment() {
 // commentBefore reports whether the current comment group occurs
 // before the next position in the source code and printing it does
 // not introduce implicit semicolons.
-//
 func (p *printer) commentBefore(next token.Position) bool {
 	return p.commentOffset < next.Offset && (!p.impliedSemi || !p.commentNewline)
 }
 
 // commentSizeBefore returns the estimated size of the
 // comments on the same line before the next position.
-//
 func (p *printer) commentSizeBefore(next token.Position) int {
 	// save/restore current p.commentInfo (p.nextComment() modifies it)
 	defer func(info commentInfo) {
@@ -179,7 +177,6 @@ func (p *printer) commentSizeBefore(next token.Position) int {
 // token in *linePtr. It is used to compute an accurate line number for a
 // formatted construct, independent of pending (not yet emitted) whitespace
 // or comments.
-//
 func (p *printer) recordLine(linePtr *int) {
 	p.linePtr = linePtr
 }
@@ -188,7 +185,6 @@ func (p *printer) recordLine(linePtr *int) {
 // output line and the line argument, ignoring any pending (not yet
 // emitted) whitespace or comments. It is used to compute an accurate
 // size (in number of lines) for a formatted construct.
-//
 func (p *printer) linesFrom(line int) int {
 	return p.out.Line - line
 }
@@ -282,7 +278,6 @@ func (p *printer) writeByte(ch byte, n int) {
 // needed (i.e., when we don't know that s contains no tabs or line breaks)
 // avoids processing extra escape characters and reduces run time of the
 // printer benchmark by up to 10%.
-//
 func (p *printer) writeString(pos token.Position, s string, isLit bool) {
 	if p.out.Column == 1 {
 		if p.Config.Mode&SourcePos != 0 {
@@ -352,7 +347,6 @@ func (p *printer) writeString(pos token.Position, s string, isLit bool) {
 // pos is the comment position, next the position of the item
 // after all pending comments, prev is the previous comment in
 // a group of comments (or nil), and tok is the next token.
-//
 func (p *printer) writeCommentPrefix(pos, next token.Position, prev *ast.Comment, tok token.Token) {
 	if len(p.output) == 0 {
 		// the comment is the first item to be printed - don't write any whitespace
@@ -478,7 +472,6 @@ func (p *printer) writeCommentPrefix(pos, next token.Position, prev *ast.Comment
 
 // Returns true if s contains only white space
 // (only tabs and blanks can appear in the printer's context).
-//
 func isBlank(s string) bool {
 	for i := 0; i < len(s); i++ {
 		if s[i] > ' ' {
@@ -507,7 +500,6 @@ func trimRight(s string) string {
 // The prefix is computed using heuristics such that is likely that the comment
 // contents are nicely laid out after re-printing each line using the printer's
 // current indentation.
-//
 func stripCommonPrefix(lines []string) {
 	if len(lines) <= 1 {
 		return // at most one line - nothing to do
@@ -695,7 +687,6 @@ func (p *printer) writeComment(comment *ast.Comment) {
 // pending whitespace. The writeCommentSuffix result indicates if a
 // newline was written or if a formfeed was dropped from the whitespace
 // buffer.
-//
 func (p *printer) writeCommentSuffix(needsLinebreak bool) (wroteNewline, droppedFF bool) {
 	for i, ch := range p.wsbuf {
 		switch ch {
@@ -744,7 +735,6 @@ func (p *printer) containsLinebreak() bool {
 // that needs to be written before the next token). A heuristic is used to mix
 // the comments and whitespace. The intersperseComments result indicates if a
 // newline was written or if a formfeed was dropped from the whitespace buffer.
-//
 func (p *printer) intersperseComments(next token.Position, tok token.Token) (wroteNewline, droppedFF bool) {
 	var last *ast.Comment
 	for p.commentBefore(next) {
@@ -877,7 +867,6 @@ func mayCombine(prev token.Token, next byte) (b bool) {
 // taking into account the amount and structure of any pending white-
 // space for best comment placement. Then, any leftover whitespace is
 // printed, followed by the actual token.
-//
 func (p *printer) print(args ...any) {
 	for _, arg := range args {
 		// information about the current arg
@@ -1020,7 +1009,6 @@ func (p *printer) print(args ...any) {
 // before the position of the next token tok. The flush result indicates
 // if a newline was written or if a formfeed was dropped from the whitespace
 // buffer.
-//
 func (p *printer) flush(next token.Position, tok token.Token) (wroteNewline, droppedFF bool) {
 	if p.commentBefore(next) {
 		// if there are comments before the next item, intersperse them
@@ -1175,7 +1163,6 @@ unsupported:
 // and vtab characters into newlines and htabs (in case no tabwriter
 // is used). Text bracketed by tabwriter.Escape characters is passed
 // through unchanged.
-//
 type trimmer struct {
 	output io.Writer
 	state  int
@@ -1363,7 +1350,6 @@ func (cfg *Config) fprint(output io.Writer, fset *token.FileSet, node any, nodeS
 
 // A CommentedNode bundles an AST node and corresponding comments.
 // It may be provided as argument to any of the Fprint functions.
-//
 type CommentedNode struct {
 	Node     any // *ast.File, or ast.Expr, ast.Decl, ast.Spec, or ast.Stmt
 	Comments []*ast.CommentGroup
@@ -1373,7 +1359,6 @@ type CommentedNode struct {
 // Position information is interpreted relative to the file set fset.
 // The node type must be *ast.File, *CommentedNode, []ast.Decl, []ast.Stmt,
 // or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
-//
 func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node any) error {
 	return cfg.fprint(output, fset, node, make(map[ast.Node]int))
 }
@@ -1382,7 +1367,6 @@ func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node any) error
 // It calls Config.Fprint with default settings.
 // Note that gofmt uses tabs for indentation but spaces for alignment;
 // use format.Node (package go/format) for output that matches gofmt.
-//
 func Fprint(output io.Writer, fset *token.FileSet, node any) error {
 	return (&Config{Tabwidth: 8}).Fprint(output, fset, node)
 }
diff --git a/src/go/printer/printer_test.go b/src/go/printer/printer_test.go
index 2071aa8aa6..ad2d86052a 100644
--- a/src/go/printer/printer_test.go
+++ b/src/go/printer/printer_test.go
@@ -212,7 +212,6 @@ func TestFiles(t *testing.T) {
 // TestLineComments, using a simple test case, checks that consecutive line
 // comments are properly terminated with a newline even if the AST position
 // information is incorrect.
-//
 func TestLineComments(t *testing.T) {
 	const src = `// comment 1
 	// comment 2
diff --git a/src/go/printer/testdata/parser.go b/src/go/printer/testdata/parser.go
index 615aceebd2..bb06c8dd42 100644
--- a/src/go/printer/testdata/parser.go
+++ b/src/go/printer/testdata/parser.go
@@ -19,7 +19,6 @@ import (
 // The mode parameter to the Parse* functions is a set of flags (or 0).
 // They control the amount of source code parsed and other optional
 // parser functionality.
-//
 const (
 	PackageClauseOnly uint = 1 << iota // parsing stops after package clause
 	ImportsOnly                        // parsing stops after import declarations
@@ -271,7 +270,6 @@ func (p *parser) consumeComment() (comment *ast.Comment, endline int) {
 // comments list, and return it together with the line at which
 // the last comment in the group ends. An empty line or non-comment
 // token terminates a comment group.
-//
 func (p *parser) consumeCommentGroup() (comments *ast.CommentGroup, endline int) {
 	var list []*ast.Comment
 	endline = p.file.Line(p.pos)
@@ -302,7 +300,6 @@ func (p *parser) consumeCommentGroup() (comments *ast.CommentGroup, endline int)
 //
 // Lead and line comments may be considered documentation that is
 // stored in the AST.
-//
 func (p *parser) next() {
 	p.leadComment = nil
 	p.lineComment = nil
@@ -947,7 +944,6 @@ func (p *parser) parseFuncTypeOrLit() ast.Expr {
 // parseOperand may return an expression or a raw type (incl. array
 // types of the form [...]T. Callers must verify the result.
 // If lhs is set and the result is an identifier, it is not resolved.
-//
 func (p *parser) parseOperand(lhs bool) ast.Expr {
 	if p.trace {
 		defer un(trace(p, "Operand"))
@@ -1214,7 +1210,6 @@ func unparen(x ast.Expr) ast.Expr {
 
 // checkExprOrType checks that x is an expression or a type
 // (and not a raw type such as [...]T).
-//
 func (p *parser) checkExprOrType(x ast.Expr) ast.Expr {
 	switch t := unparen(x).(type) {
 	case *ast.ParenExpr:
diff --git a/src/go/scanner/errors.go b/src/go/scanner/errors.go
index 3114f4b645..3e9c365cca 100644
--- a/src/go/scanner/errors.go
+++ b/src/go/scanner/errors.go
@@ -15,7 +15,6 @@ import (
 // The position Pos, if valid, points to the beginning of
 // the offending token, and the error condition is described
 // by Msg.
-//
 type Error struct {
 	Pos token.Position
 	Msg string
@@ -33,7 +32,6 @@ func (e Error) Error() string {
 
 // ErrorList is a list of *Errors.
 // The zero value for an ErrorList is an empty ErrorList ready to use.
-//
 type ErrorList []*Error
 
 // Add adds an Error with given position and error message to an ErrorList.
@@ -69,7 +67,6 @@ func (p ErrorList) Less(i, j int) bool {
 // Sort sorts an ErrorList. *Error entries are sorted by position,
 // other errors are sorted by error message, and before any *Error
 // entry.
-//
 func (p ErrorList) Sort() {
 	sort.Sort(p)
 }
@@ -112,7 +109,6 @@ func (p ErrorList) Err() error {
 // PrintError is a utility function that prints a list of errors to w,
 // one error per line, if the err parameter is an ErrorList. Otherwise
 // it prints the err string.
-//
 func PrintError(w io.Writer, err error) {
 	if list, ok := err.(ErrorList); ok {
 		for _, e := range list {
diff --git a/src/go/scanner/scanner.go b/src/go/scanner/scanner.go
index 23d8db9d1c..b53de7a427 100644
--- a/src/go/scanner/scanner.go
+++ b/src/go/scanner/scanner.go
@@ -22,13 +22,11 @@ import (
 // encountered and a handler was installed, the handler is called with a
 // position and an error message. The position points to the beginning of
 // the offending token.
-//
 type ErrorHandler func(pos token.Position, msg string)
 
 // A Scanner holds the scanner's internal state while processing
 // a given text. It can be allocated as part of another data
 // structure but must be initialized via Init before use.
-//
 type Scanner struct {
 	// immutable state
 	file *token.File  // source file handle
@@ -101,7 +99,6 @@ func (s *Scanner) peek() byte {
 
 // A mode value is a set of flags (or 0).
 // They control scanner behavior.
-//
 type Mode uint
 
 const (
@@ -123,7 +120,6 @@ const (
 //
 // Note that Init may call err if there is an error in the first character
 // of the file.
-//
 func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode) {
 	// Explicitly initialize all fields since a scanner may be reused.
 	if file.Size() != len(src) {
@@ -825,7 +821,6 @@ func (s *Scanner) switch4(tok0, tok1 token.Token, ch2 rune, tok2, tok3 token.Tok
 // Scan adds line information to the file added to the file
 // set with Init. Token positions are relative to that file
 // and thus relative to the file set.
-//
 func (s *Scanner) Scan() (pos token.Pos, tok token.Token, lit string) {
 scanAgain:
 	s.skipWhitespace()
diff --git a/src/go/token/position.go b/src/go/token/position.go
index ce4af03923..00f24535bf 100644
--- a/src/go/token/position.go
+++ b/src/go/token/position.go
@@ -16,7 +16,6 @@ import (
 // Position describes an arbitrary source position
 // including the file, line, and column location.
 // A Position is valid if the line number is > 0.
-//
 type Position struct {
 	Filename string // filename, if any
 	Offset   int    // offset, starting at 0
@@ -35,7 +34,6 @@ func (pos *Position) IsValid() bool { return pos.Line > 0 }
 //	line                valid position without file name and no column (column == 0)
 //	file                invalid position with file name
 //	-                   invalid position without file name
-//
 func (pos Position) String() string {
 	s := pos.Filename
 	if pos.IsValid() {
@@ -75,14 +73,12 @@ func (pos Position) String() string {
 // equivalent to comparing the respective source file offsets. If p and q
 // are in different files, p < q is true if the file implied by p was added
 // to the respective file set before the file implied by q.
-//
 type Pos int
 
 // The zero value for Pos is NoPos; there is no file and line information
 // associated with it, and NoPos.IsValid() is false. NoPos is always
 // smaller than any other Pos value. The corresponding Position value
 // for NoPos is the zero value for Position.
-//
 const NoPos Pos = 0
 
 // IsValid reports whether the position is valid.
@@ -95,7 +91,6 @@ func (p Pos) IsValid() bool {
 
 // A File is a handle for a file belonging to a FileSet.
 // A File has a name, size, and line offset table.
-//
 type File struct {
 	set  *FileSet
 	name string // file name as provided to AddFile
@@ -134,7 +129,6 @@ func (f *File) LineCount() int {
 // AddLine adds the line offset for a new line.
 // The line offset must be larger than the offset for the previous line
 // and smaller than the file size; otherwise the line offset is ignored.
-//
 func (f *File) AddLine(offset int) {
 	f.mutex.Lock()
 	if i := len(f.lines); (i == 0 || f.lines[i-1] < offset) && offset < f.size {
@@ -147,7 +141,6 @@ func (f *File) AddLine(offset int) {
 // the newline character at the end of the line with a space (to not change the
 // remaining offsets). To obtain the line number, consult e.g. Position.Line.
 // MergeLine will panic if given an invalid line number.
-//
 func (f *File) MergeLine(line int) {
 	if line < 1 {
 		panic(fmt.Sprintf("invalid line number %d (should be >= 1)", line))
@@ -174,7 +167,6 @@ func (f *File) MergeLine(line int) {
 // and smaller than the file size; otherwise SetLines fails and returns
 // false.
 // Callers must not mutate the provided slice after SetLines returns.
-//
 func (f *File) SetLines(lines []int) bool {
 	// verify validity of lines table
 	size := f.size
@@ -239,7 +231,6 @@ type lineInfo struct {
 
 // AddLineInfo is like AddLineColumnInfo with a column = 1 argument.
 // It is here for backward-compatibility for code prior to Go 1.11.
-//
 func (f *File) AddLineInfo(offset int, filename string, line int) {
 	f.AddLineColumnInfo(offset, filename, line, 1)
 }
@@ -252,7 +243,6 @@ func (f *File) AddLineInfo(offset int, filename string, line int) {
 //
 // AddLineColumnInfo is typically used to register alternative position
 // information for line directives such as //line filename:line:column.
-//
 func (f *File) AddLineColumnInfo(offset int, filename string, line, column int) {
 	f.mutex.Lock()
 	if i := len(f.infos); i == 0 || f.infos[i-1].Offset < offset && offset < f.size {
@@ -264,7 +254,6 @@ func (f *File) AddLineColumnInfo(offset int, filename string, line, column int)
 // Pos returns the Pos value for the given file offset;
 // the offset must be <= f.Size().
 // f.Pos(f.Offset(p)) == p.
-//
 func (f *File) Pos(offset int) Pos {
 	if offset > f.size {
 		panic(fmt.Sprintf("invalid file offset %d (should be <= %d)", offset, f.size))
@@ -275,7 +264,6 @@ func (f *File) Pos(offset int) Pos {
 // Offset returns the offset for the given file position p;
 // p must be a valid Pos value in that file.
 // f.Offset(f.Pos(offset)) == offset.
-//
 func (f *File) Offset(p Pos) int {
 	if int(p) < f.base || int(p) > f.base+f.size {
 		panic(fmt.Sprintf("invalid Pos value %d (should be in [%d, %d])", p, f.base, f.base+f.size))
@@ -285,7 +273,6 @@ func (f *File) Offset(p Pos) int {
 
 // Line returns the line number for the given file position p;
 // p must be a Pos value in that file or NoPos.
-//
 func (f *File) Line(p Pos) int {
 	return f.Position(p).Line
 }
@@ -297,7 +284,6 @@ func searchLineInfos(a []lineInfo, x int) int {
 // unpack returns the filename and line and column number for a file offset.
 // If adjusted is set, unpack will return the filename and line information
 // possibly adjusted by //line comments; otherwise those comments are ignored.
-//
 func (f *File) unpack(offset int, adjusted bool) (filename string, line, column int) {
 	f.mutex.Lock()
 	defer f.mutex.Unlock()
@@ -342,7 +328,6 @@ func (f *File) position(p Pos, adjusted bool) (pos Position) {
 // If adjusted is set, the position may be adjusted by position-altering
 // //line comments; otherwise those comments are ignored.
 // p must be a Pos value in f or NoPos.
-//
 func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
 	if p != NoPos {
 		if int(p) < f.base || int(p) > f.base+f.size {
@@ -355,7 +340,6 @@ func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
 
 // Position returns the Position value for the given file position p.
 // Calling f.Position(p) is equivalent to calling f.PositionFor(p, true).
-//
 func (f *File) Position(p Pos) (pos Position) {
 	return f.PositionFor(p, true)
 }
@@ -382,7 +366,6 @@ func (f *File) Position(p Pos) (pos Position) {
 // recently added file, plus one. Unless there is a need to extend an
 // interval later, using the FileSet.Base should be used as argument
 // for FileSet.AddFile.
-//
 type FileSet struct {
 	mutex sync.RWMutex // protects the file set
 	base  int          // base offset for the next file
@@ -399,7 +382,6 @@ func NewFileSet() *FileSet {
 
 // Base returns the minimum base offset that must be provided to
 // AddFile when adding the next file.
-//
 func (s *FileSet) Base() int {
 	s.mutex.RLock()
 	b := s.base
@@ -423,7 +405,6 @@ func (s *FileSet) Base() int {
 // with offs in the range [0, size] and thus p in the range [base, base+size].
 // For convenience, File.Pos may be used to create file-specific position
 // values from a file offset.
-//
 func (s *FileSet) AddFile(filename string, base, size int) *File {
 	s.mutex.Lock()
 	defer s.mutex.Unlock()
@@ -451,7 +432,6 @@ func (s *FileSet) AddFile(filename string, base, size int) *File {
 
 // Iterate calls f for the files in the file set in the order they were added
 // until f returns false.
-//
 func (s *FileSet) Iterate(f func(*File) bool) {
 	for i := 0; ; i++ {
 		var file *File
@@ -496,7 +476,6 @@ func (s *FileSet) file(p Pos) *File {
 // File returns the file that contains the position p.
 // If no such file is found (for instance for p == NoPos),
 // the result is nil.
-//
 func (s *FileSet) File(p Pos) (f *File) {
 	if p != NoPos {
 		f = s.file(p)
@@ -508,7 +487,6 @@ func (s *FileSet) File(p Pos) (f *File) {
 // If adjusted is set, the position may be adjusted by position-altering
 // //line comments; otherwise those comments are ignored.
 // p must be a Pos value in s or NoPos.
-//
 func (s *FileSet) PositionFor(p Pos, adjusted bool) (pos Position) {
 	if p != NoPos {
 		if f := s.file(p); f != nil {
@@ -520,7 +498,6 @@ func (s *FileSet) PositionFor(p Pos, adjusted bool) (pos Position) {
 
 // Position converts a Pos p in the fileset into a Position value.
 // Calling s.Position(p) is equivalent to calling s.PositionFor(p, true).
-//
 func (s *FileSet) Position(p Pos) (pos Position) {
 	return s.PositionFor(p, true)
 }
diff --git a/src/go/token/token.go b/src/go/token/token.go
index 17047d8713..b691883261 100644
--- a/src/go/token/token.go
+++ b/src/go/token/token.go
@@ -239,7 +239,6 @@ var tokens = [...]string{
 // token character sequence (e.g., for the token ADD, the string is
 // "+"). For all other tokens the string corresponds to the token
 // constant name (e.g. for the token IDENT, the string is "IDENT").
-//
 func (tok Token) String() string {
 	s := ""
 	if 0 <= tok && tok < Token(len(tokens)) {
@@ -256,7 +255,6 @@ func (tok Token) String() string {
 // starting with precedence 1 up to unary operators. The highest
 // precedence serves as "catch-all" precedence for selector,
 // indexing, and other operator and delimiter tokens.
-//
 const (
 	LowestPrec  = 0 // non-operators
 	UnaryPrec   = 6
@@ -266,7 +264,6 @@ const (
 // Precedence returns the operator precedence of the binary
 // operator op. If op is not a binary operator, the result
 // is LowestPrecedence.
-//
 func (op Token) Precedence() int {
 	switch op {
 	case LOR:
@@ -293,7 +290,6 @@ func init() {
 }
 
 // Lookup maps an identifier to its keyword token or IDENT (if not a keyword).
-//
 func Lookup(ident string) Token {
 	if tok, is_keyword := keywords[ident]; is_keyword {
 		return tok
@@ -305,30 +301,25 @@ func Lookup(ident string) Token {
 
 // IsLiteral returns true for tokens corresponding to identifiers
 // and basic type literals; it returns false otherwise.
-//
 func (tok Token) IsLiteral() bool { return literal_beg < tok && tok < literal_end }
 
 // IsOperator returns true for tokens corresponding to operators and
 // delimiters; it returns false otherwise.
-//
 func (tok Token) IsOperator() bool {
 	return (operator_beg < tok && tok < operator_end) || tok == TILDE
 }
 
 // IsKeyword returns true for tokens corresponding to keywords;
 // it returns false otherwise.
-//
 func (tok Token) IsKeyword() bool { return keyword_beg < tok && tok < keyword_end }
 
 // IsExported reports whether name starts with an upper-case letter.
-//
 func IsExported(name string) bool {
 	ch, _ := utf8.DecodeRuneInString(name)
 	return unicode.IsUpper(ch)
 }
 
 // IsKeyword reports whether name is a Go keyword, such as "func" or "return".
-//
 func IsKeyword(name string) bool {
 	// TODO: opt: use a perfect hash function instead of a global map.
 	_, ok := keywords[name]
@@ -338,7 +329,6 @@ func IsKeyword(name string) bool {
 // IsIdentifier reports whether name is a Go identifier, that is, a non-empty
 // string made up of letters, digits, and underscores, where the first character
 // is not a digit. Keywords are not identifiers.
-//
 func IsIdentifier(name string) bool {
 	if name == "" || IsKeyword(name) {
 		return false
diff --git a/src/go/types/api.go b/src/go/types/api.go
index 2cbabb0a53..04342bfac5 100644
--- a/src/go/types/api.go
+++ b/src/go/types/api.go
@@ -280,7 +280,6 @@ type Info struct {
 
 // TypeOf returns the type of expression e, or nil if not found.
 // Precondition: the Types, Uses and Defs maps are populated.
-//
 func (info *Info) TypeOf(e ast.Expr) Type {
 	if t, ok := info.Types[e]; ok {
 		return t.Type
@@ -300,7 +299,6 @@ func (info *Info) TypeOf(e ast.Expr) Type {
 // it defines, not the type (*TypeName) it uses.
 //
 // Precondition: the Uses and Defs maps are populated.
-//
 func (info *Info) ObjectOf(id *ast.Ident) Object {
 	if obj := info.Defs[id]; obj != nil {
 		return obj
diff --git a/src/go/types/builtins.go b/src/go/types/builtins.go
index c81e73c828..414c2c3ea0 100644
--- a/src/go/types/builtins.go
+++ b/src/go/types/builtins.go
@@ -16,7 +16,6 @@ import (
 // reports whether the call is valid, with *x holding the result;
 // but x.expr is not set. If the call is invalid, the result is
 // false, and *x is undefined.
-//
 func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ bool) {
 	// append is the only built-in that permits the use of ... for the last argument
 	bin := predeclaredFuncs[id]
diff --git a/src/go/types/check_test.go b/src/go/types/check_test.go
index 592ced41ec..5c42d124ea 100644
--- a/src/go/types/check_test.go
+++ b/src/go/types/check_test.go
@@ -55,7 +55,6 @@ var posMsgRx = regexp.MustCompile(`^(.*:[0-9]+:[0-9]+): *(?s)(.*)`)
 // splitError splits an error's error message into a position string
 // and the actual error message. If there's no position information,
 // pos is the empty string, and msg is the entire error message.
-//
 func splitError(err error) (pos, msg string) {
 	msg = err.Error()
 	if m := posMsgRx.FindStringSubmatch(msg); len(m) == 3 {
@@ -92,7 +91,6 @@ func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode parser.Mod
 // Space around "rx" or rx is ignored. Use the form `ERROR HERE "rx"`
 // for error messages that are located immediately after rather than
 // at a token's position.
-//
 var errRx = regexp.MustCompile(`^ *ERROR *(HERE)? *"?([^"]*)"?`)
 
 // errMap collects the regular expressions of ERROR comments found
diff --git a/src/go/types/eval.go b/src/go/types/eval.go
index 5700cbf79c..084f746fe6 100644
--- a/src/go/types/eval.go
+++ b/src/go/types/eval.go
@@ -53,7 +53,6 @@ func Eval(fset *token.FileSet, pkg *Package, pos token.Pos, expr string) (_ Type
 // functions ignore the context in which an expression is used (e.g., an
 // assignment). Thus, top-level untyped constants will return an
 // untyped type rather then the respective context-specific type.
-//
 func CheckExpr(fset *token.FileSet, pkg *Package, pos token.Pos, expr ast.Expr, info *Info) (err error) {
 	// determine scope
 	var scope *Scope
diff --git a/src/go/types/expr.go b/src/go/types/expr.go
index a3c9041bdd..1def8cc84d 100644
--- a/src/go/types/expr.go
+++ b/src/go/types/expr.go
@@ -1194,7 +1194,6 @@ const (
 // If hint != nil, it is the type of a composite literal element.
 // If allowGeneric is set, the operand type may be an uninstantiated
 // parameterized type or function value.
-//
 func (check *Checker) rawExpr(x *operand, e ast.Expr, hint Type, allowGeneric bool) exprKind {
 	if trace {
 		check.trace(e.Pos(), "-- expr %s", e)
@@ -1242,7 +1241,6 @@ func (check *Checker) nonGeneric(x *operand) {
 
 // exprInternal contains the core of type checking of expressions.
 // Must only be called by rawExpr.
-//
 func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind {
 	// make sure x has a valid state in case of bailout
 	// (was issue 5770)
@@ -1707,7 +1705,6 @@ func (check *Checker) typeAssertion(e ast.Expr, x *operand, T Type, typeSwitch b
 // expr typechecks expression e and initializes x with the expression value.
 // The result must be a single value.
 // If an error occurred, x.mode is set to invalid.
-//
 func (check *Checker) expr(x *operand, e ast.Expr) {
 	check.rawExpr(x, e, nil, false)
 	check.exclude(x, 1<= 0). It returns the length of the
 // literal (maximum index value + 1).
-//
 func (check *Checker) indexedElts(elts []ast.Expr, typ Type, length int64) int64 {
 	visited := make(map[int64]bool, len(elts))
 	var index, max int64
diff --git a/src/go/types/lookup.go b/src/go/types/lookup.go
index 77fc17f5c3..e38f56c956 100644
--- a/src/go/types/lookup.go
+++ b/src/go/types/lookup.go
@@ -41,7 +41,6 @@ import (
 //	- If indirect is set, a method with a pointer receiver type was found
 //      but there was no pointer on the path from the actual receiver type to
 //	the method's formal receiver base type, nor was the receiver addressable.
-//
 func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool) {
 	if T == nil {
 		panic("LookupFieldOrMethod on nil type")
@@ -281,7 +280,6 @@ func lookupType(m map[Type]int, typ Type) (int, bool) {
 // is not set), MissingMethod only checks that methods of T which are also
 // present in V have matching types (e.g., for a type assertion x.(T) where
 // x is of interface type V).
-//
 func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
 	m, alt := (*Checker)(nil).missingMethod(V, T, static)
 	// Only report a wrong type if the alternative method has the same name as m.
diff --git a/src/go/types/object.go b/src/go/types/object.go
index 8975fc93dc..89dcd83c2d 100644
--- a/src/go/types/object.go
+++ b/src/go/types/object.go
@@ -14,7 +14,6 @@ import (
 // An Object describes a named language entity such as a package,
 // constant, type, variable, function (incl. methods), or label.
 // All objects implement the Object interface.
-//
 type Object interface {
 	Parent() *Scope // scope in which this object is declared; nil for methods and struct fields
 	Pos() token.Pos // position of object identifier in declaration
diff --git a/src/go/types/operand.go b/src/go/types/operand.go
index 4d7f1e3b63..f9f109aa69 100644
--- a/src/go/types/operand.go
+++ b/src/go/types/operand.go
@@ -49,7 +49,6 @@ var operandModeString = [...]string{
 // the operand, the operand's type, a value for constants, and an id
 // for built-in functions.
 // The zero value of operand is a ready to use invalid operand.
-//
 type operand struct {
 	mode operandMode
 	expr ast.Expr
@@ -60,7 +59,6 @@ type operand struct {
 
 // Pos returns the position of the expression corresponding to x.
 // If x is invalid the position is token.NoPos.
-//
 func (x *operand) Pos() token.Pos {
 	// x.expr may not be set if x is invalid
 	if x.expr == nil {
@@ -102,7 +100,6 @@ func (x *operand) Pos() token.Pos {
 //
 // cgofunc     (                     )
 // cgofunc     (                      of type )
-//
 func operandString(x *operand, qf Qualifier) string {
 	// special-case nil
 	if x.mode == value && x.typ == Typ[UntypedNil] {
diff --git a/src/go/types/selection.go b/src/go/types/selection.go
index 6ec69d21db..4e06ab16b4 100644
--- a/src/go/types/selection.go
+++ b/src/go/types/selection.go
@@ -36,7 +36,6 @@ const (
 //	p.x         FieldVal      T       x      int        {0}       true
 //	p.m         MethodVal     *T      m      func()     {1, 0}    true
 //	T.m         MethodExpr    T       m      func(T)    {1, 0}    false
-//
 type Selection struct {
 	kind     SelectionKind
 	recv     Type   // type of x
@@ -115,7 +114,6 @@ func (s *Selection) String() string { return SelectionString(s, nil) }
 //	"field (T) f int"
 //	"method (T) f(X) Y"
 //	"method expr (T) f(X) Y"
-//
 func SelectionString(s *Selection, qf Qualifier) string {
 	var k string
 	switch s.kind {
diff --git a/src/go/types/sizes.go b/src/go/types/sizes.go
index dd4b78969f..fd18fc5796 100644
--- a/src/go/types/sizes.go
+++ b/src/go/types/sizes.go
@@ -39,7 +39,6 @@ type Sizes interface {
 //	  types are naturally aligned with a maximum alignment MaxAlign.
 //
 // *StdSizes implements Sizes.
-//
 type StdSizes struct {
 	WordSize int64 // word size in bytes - must be >= 4 (32bits)
 	MaxAlign int64 // maximum alignment in bytes - must be >= 1
diff --git a/src/go/types/typestring.go b/src/go/types/typestring.go
index 80210a2f34..0325d4a77f 100644
--- a/src/go/types/typestring.go
+++ b/src/go/types/typestring.go
@@ -26,7 +26,6 @@ import (
 //
 // Using a nil Qualifier is equivalent to using (*Package).Path: the
 // object is qualified by the import path, e.g., "encoding/json.Marshal".
-//
 type Qualifier func(*Package) string
 
 // RelativeTo returns a Qualifier that fully qualifies members of
diff --git a/src/go/types/typeterm.go b/src/go/types/typeterm.go
index 6b67821000..13b6ce6d0d 100644
--- a/src/go/types/typeterm.go
+++ b/src/go/types/typeterm.go
@@ -10,7 +10,6 @@ package types
 //   𝓤:  &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   Type
diff --git a/src/go/types/typexpr.go b/src/go/types/typexpr.go
index bae9dc816c..b704372dcf 100644
--- a/src/go/types/typexpr.go
+++ b/src/go/types/typexpr.go
@@ -18,7 +18,6 @@ import (
 // If an error occurred, x.mode is set to invalid.
 // For the meaning of def, see Checker.definedType, below.
 // If wantType is set, the identifier e is expected to denote a type.
-//
 func (check *Checker) ident(x *operand, e *ast.Ident, def *Named, wantType bool) {
 	x.mode = invalid
 	x.expr = e
@@ -177,7 +176,6 @@ func (check *Checker) validVarType(e ast.Expr, typ Type) {
 // If def != nil, e is the type specification for the defined type def, declared
 // in a type declaration, and def.underlying will be set to the type of e before
 // any components of e are type-checked.
-//
 func (check *Checker) definedType(e ast.Expr, def *Named) Type {
 	typ := check.typInternal(e, def)
 	assert(isTyped(typ))
@@ -214,7 +212,6 @@ func goTypeName(typ Type) string {
 
 // typInternal drives type checking of types.
 // Must only be called by definedType or genericType.
-//
 func (check *Checker) typInternal(e0 ast.Expr, def *Named) (T Type) {
 	if trace {
 		check.trace(e0.Pos(), "-- type %s", e0)
diff --git a/src/go/types/universe.go b/src/go/types/universe.go
index f58128f480..8ac48e506e 100644
--- a/src/go/types/universe.go
+++ b/src/go/types/universe.go
@@ -246,7 +246,6 @@ func init() {
 // Objects with names containing blanks are internal and not entered into
 // a scope. Objects with exported names are inserted in the unsafe package
 // scope; other objects are inserted in the universe scope.
-//
 func def(obj Object) {
 	assert(obj.color() == black)
 	name := obj.Name()
diff --git a/src/html/template/template.go b/src/html/template/template.go
index 952f52979d..a99f69231c 100644
--- a/src/html/template/template.go
+++ b/src/html/template/template.go
@@ -72,7 +72,6 @@ func (t *Template) Templates() []*Template {
 //		The operation returns the zero value for the map type's element.
 //	"missingkey=error"
 //		Execution stops immediately with an error.
-//
 func (t *Template) Option(opt ...string) *Template {
 	t.text.Option(opt...)
 	return t
diff --git a/src/index/suffixarray/suffixarray.go b/src/index/suffixarray/suffixarray.go
index 9c169e7aca..cdc6e81a80 100644
--- a/src/index/suffixarray/suffixarray.go
+++ b/src/index/suffixarray/suffixarray.go
@@ -230,7 +230,6 @@ func (x *Index) Write(w io.Writer) error {
 
 // Bytes returns the data over which the index was created.
 // It must not be modified.
-//
 func (x *Index) Bytes() []byte {
 	return x.data
 }
@@ -255,7 +254,6 @@ func (x *Index) lookupAll(s []byte) ints {
 // The result is nil if s is empty, s is not found, or n == 0.
 // Lookup time is O(log(N)*len(s) + len(result)) where N is the
 // size of the indexed data.
-//
 func (x *Index) Lookup(s []byte, n int) (result []int) {
 	if len(s) > 0 && n != 0 {
 		matches := x.lookupAll(s)
@@ -286,7 +284,6 @@ func (x *Index) Lookup(s []byte, n int) (result []int) {
 // in successive order. Otherwise, at most n matches are returned and
 // they may not be successive. The result is nil if there are no matches,
 // or if n == 0.
-//
 func (x *Index) FindAllIndex(r *regexp.Regexp, n int) (result [][]int) {
 	// a non-empty literal prefix is used to determine possible
 	// match start indices with Lookup
diff --git a/src/internal/fmtsort/sort.go b/src/internal/fmtsort/sort.go
index 34c1f477f0..09e987d0e6 100644
--- a/src/internal/fmtsort/sort.go
+++ b/src/internal/fmtsort/sort.go
@@ -48,7 +48,6 @@ func (o *SortedMap) Swap(i, j int) {
 //    Otherwise identical arrays compare by length.
 //  - interface values compare first by reflect.Type describing the concrete type
 //    and then by concrete value as described in the previous rules.
-//
 func Sort(mapValue reflect.Value) *SortedMap {
 	if mapValue.Type().Kind() != reflect.Map {
 		return nil
diff --git a/src/io/fs/walk.go b/src/io/fs/walk.go
index 52a51bbd37..37800794a2 100644
--- a/src/io/fs/walk.go
+++ b/src/io/fs/walk.go
@@ -58,7 +58,6 @@ var SkipDir = errors.New("skip this directory")
 //     to bypass the directory read entirely.
 //   - If a directory read fails, the function is called a second time
 //     for that directory to report the error.
-//
 type WalkDirFunc func(path string, d DirEntry, err error) error
 
 // walkDir recursively descends path, calling walkDirFn.
diff --git a/src/math/big/float.go b/src/math/big/float.go
index a8c91a6e54..70c7b794a4 100644
--- a/src/math/big/float.go
+++ b/src/math/big/float.go
@@ -236,7 +236,6 @@ func (x *Float) Acc() Accuracy {
 //	-1 if x <   0
 //	 0 if x is ±0
 //	+1 if x >   0
-//
 func (x *Float) Sign() int {
 	if debugFloat {
 		x.validate()
@@ -1672,7 +1671,6 @@ func (z *Float) Quo(x, y *Float) *Float {
 //   -1 if x <  y
 //    0 if x == y (incl. -0 == 0, -Inf == -Inf, and +Inf == +Inf)
 //   +1 if x >  y
-//
 func (x *Float) Cmp(y *Float) int {
 	if debugFloat {
 		x.validate()
@@ -1707,7 +1705,6 @@ func (x *Float) Cmp(y *Float) int {
 //	 0 if x == 0 (signed or unsigned)
 //	+1 if 0 < x < +Inf
 //	+2 if x == +Inf
-//
 func (x *Float) ord() int {
 	var m int
 	switch x.form {
diff --git a/src/math/big/floatconv.go b/src/math/big/floatconv.go
index 57b7df3936..93f7195219 100644
--- a/src/math/big/floatconv.go
+++ b/src/math/big/floatconv.go
@@ -153,7 +153,6 @@ func (z *Float) scan(r io.ByteScanner, base int) (f *Float, b int, err error) {
 //	for p, q := uint64(0), uint64(1); p < q; p, q = q, q*5 {
 //		fmt.Println(q)
 //	}
-//
 var pow5tab = [...]uint64{
 	1,
 	5,
@@ -257,7 +256,6 @@ func (z *Float) pow5(n uint64) *Float {
 //
 // The returned *Float f is nil and the value of z is valid but not
 // defined if an error is reported.
-//
 func (z *Float) Parse(s string, base int) (f *Float, b int, err error) {
 	// scan doesn't handle ±Inf
 	if len(s) == 3 && (s == "Inf" || s == "inf") {
diff --git a/src/math/big/int.go b/src/math/big/int.go
index 7647346486..700d00d031 100644
--- a/src/math/big/int.go
+++ b/src/math/big/int.go
@@ -34,7 +34,6 @@ var intOne = &Int{false, natOne}
 //	-1 if x <  0
 //	 0 if x == 0
 //	+1 if x >  0
-//
 func (x *Int) Sign() int {
 	if len(x.abs) == 0 {
 		return 0
@@ -234,7 +233,6 @@ func (z *Int) Rem(x, y *Int) *Int {
 //
 // (See Daan Leijen, ``Division and Modulus for Computer Scientists''.)
 // See DivMod for Euclidean division and modulus (unlike Go).
-//
 func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {
 	z.abs, r.abs = z.abs.div(r.abs, x.abs, y.abs)
 	z.neg, r.neg = len(z.abs) > 0 && x.neg != y.neg, len(r.abs) > 0 && x.neg // 0 has no sign
@@ -292,7 +290,6 @@ func (z *Int) Mod(x, y *Int) *Int {
 // Systems (TOPLAS), 14(2):127-144, New York, NY, USA, 4/1992.
 // ACM press.)
 // See QuoRem for T-division and modulus (like Go).
-//
 func (z *Int) DivMod(x, y, m *Int) (*Int, *Int) {
 	y0 := y // save y
 	if z == y || alias(z.abs, y.abs) {
@@ -316,7 +313,6 @@ func (z *Int) DivMod(x, y, m *Int) (*Int, *Int) {
 //   -1 if x <  y
 //    0 if x == y
 //   +1 if x >  y
-//
 func (x *Int) Cmp(y *Int) (r int) {
 	// x cmp y == x cmp y
 	// x cmp (-y) == x
@@ -343,7 +339,6 @@ func (x *Int) Cmp(y *Int) (r int) {
 //   -1 if |x| <  |y|
 //    0 if |x| == |y|
 //   +1 if |x| >  |y|
-//
 func (x *Int) CmpAbs(y *Int) int {
 	return x.abs.cmp(y.abs)
 }
@@ -420,7 +415,6 @@ func (x *Int) IsUint64() bool {
 // Incorrect placement of underscores is reported as an error if there
 // are no other errors. If base != 0, underscores are not recognized
 // and act like any other character that is not a valid digit.
-//
 func (z *Int) SetString(s string, base int) (*Int, bool) {
 	return z.setFromScanner(strings.NewReader(s), base)
 }
diff --git a/src/math/big/intconv.go b/src/math/big/intconv.go
index 0567284105..2fe10ff0a2 100644
--- a/src/math/big/intconv.go
+++ b/src/math/big/intconv.go
@@ -63,7 +63,6 @@ var _ fmt.Formatter = intOne // *Int must implement fmt.Formatter
 // specification of minimum digits precision, output field
 // width, space or zero padding, and '-' for left or right
 // justification.
-//
 func (x *Int) Format(s fmt.State, ch rune) {
 	// determine base
 	var base int
@@ -178,7 +177,6 @@ func (x *Int) Format(s fmt.State, ch rune) {
 // ``0b'' or ``0B'' selects base 2; a ``0'', ``0o'', or ``0O'' prefix selects
 // base 8, and a ``0x'' or ``0X'' prefix selects base 16. Otherwise the selected
 // base is 10.
-//
 func (z *Int) scan(r io.ByteScanner, base int) (*Int, int, error) {
 	// determine sign
 	neg, err := scanSign(r)
diff --git a/src/math/big/nat.go b/src/math/big/nat.go
index 31e1ad8fcf..ee0c63eb28 100644
--- a/src/math/big/nat.go
+++ b/src/math/big/nat.go
@@ -31,7 +31,6 @@ import (
 // During arithmetic operations, denormalized values may occur but are
 // always normalized before returning the final result. The normalized
 // representation of 0 is the empty or nil slice (length = 0).
-//
 type nat []Word
 
 var (
diff --git a/src/math/big/natconv.go b/src/math/big/natconv.go
index 42d1cccf6f..99488ac833 100644
--- a/src/math/big/natconv.go
+++ b/src/math/big/natconv.go
@@ -105,7 +105,6 @@ var (
 // parsed. A digit count <= 0 indicates the presence of a period (if fracOk
 // is set, only), and -count is the number of fractional digits found.
 // In this case, the actual value of the scanned number is res * b**count.
-//
 func (z nat) scan(r io.ByteScanner, base int, fracOk bool) (res nat, b, count int, err error) {
 	// reject invalid bases
 	baseOk := base == 0 ||
@@ -366,7 +365,6 @@ func (x nat) itoa(neg bool, base int) []byte {
 // range 2..64 shows that values of 8 and 16 work well, with a 4x speedup at medium lengths and
 // ~30x for 20000 digits. Use nat_test.go's BenchmarkLeafSize tests to optimize leafSize for
 // specific hardware.
-//
 func (q nat) convertWords(s []byte, b Word, ndigits int, bb Word, table []divisor) {
 	// split larger blocks recursively
 	if table != nil {
diff --git a/src/math/big/rat.go b/src/math/big/rat.go
index 731a979ff7..e77da67d1b 100644
--- a/src/math/big/rat.go
+++ b/src/math/big/rat.go
@@ -392,7 +392,6 @@ func (z *Rat) Inv(x *Rat) *Rat {
 //	-1 if x <  0
 //	 0 if x == 0
 //	+1 if x >  0
-//
 func (x *Rat) Sign() int {
 	return x.a.Sign()
 }
@@ -482,7 +481,6 @@ func (z *Int) scaleDenom(x *Int, f nat) {
 //   -1 if x <  y
 //    0 if x == y
 //   +1 if x >  y
-//
 func (x *Rat) Cmp(y *Rat) int {
 	var a, b Int
 	a.scaleDenom(&x.a, y.b.abs)
diff --git a/src/math/rand/exp.go b/src/math/rand/exp.go
index 5a8d946c0c..9a07ba1be0 100644
--- a/src/math/rand/exp.go
+++ b/src/math/rand/exp.go
@@ -27,7 +27,6 @@ const (
 // callers can adjust the output using:
 //
 //  sample = ExpFloat64() / desiredRateParameter
-//
 func (r *Rand) ExpFloat64() float64 {
 	for {
 		j := r.Uint32()
diff --git a/src/math/rand/normal.go b/src/math/rand/normal.go
index 2c5a7aa99b..48ecdd5adb 100644
--- a/src/math/rand/normal.go
+++ b/src/math/rand/normal.go
@@ -34,7 +34,6 @@ func absInt32(i int32) uint32 {
 // adjust the output using:
 //
 //  sample = NormFloat64() * desiredStdDev + desiredMean
-//
 func (r *Rand) NormFloat64() float64 {
 	for {
 		j := int32(r.Uint32()) // Possibly negative
diff --git a/src/math/rand/rand.go b/src/math/rand/rand.go
index 13f20ca5ef..dfbd1fa4e7 100644
--- a/src/math/rand/rand.go
+++ b/src/math/rand/rand.go
@@ -366,7 +366,6 @@ func Read(p []byte) (n int, err error) { return globalRand.Read(p) }
 // adjust the output using:
 //
 //  sample = NormFloat64() * desiredStdDev + desiredMean
-//
 func NormFloat64() float64 { return globalRand.NormFloat64() }
 
 // ExpFloat64 returns an exponentially distributed float64 in the range
@@ -376,7 +375,6 @@ func NormFloat64() float64 { return globalRand.NormFloat64() }
 // callers can adjust the output using:
 //
 //  sample = ExpFloat64() / desiredRateParameter
-//
 func ExpFloat64() float64 { return globalRand.ExpFloat64() }
 
 type lockedSource struct {
diff --git a/src/net/http/client.go b/src/net/http/client.go
index 465ee0b723..bc0ed1fc50 100644
--- a/src/net/http/client.go
+++ b/src/net/http/client.go
@@ -54,7 +54,6 @@ import (
 // with the expectation that the Jar will insert those mutated cookies
 // with the updated values (assuming the origin matches).
 // If Jar is nil, the initial cookies are forwarded without change.
-//
 type Client struct {
 	// Transport specifies the mechanism by which individual
 	// HTTP requests are made.
diff --git a/src/net/http/fs.go b/src/net/http/fs.go
index 6caee9ed93..d8f924296b 100644
--- a/src/net/http/fs.go
+++ b/src/net/http/fs.go
@@ -836,7 +836,6 @@ func FS(fsys fs.FS) FileSystem {
 // To use an fs.FS implementation, use http.FS to convert it:
 //
 //	http.Handle("/", http.FileServer(http.FS(fsys)))
-//
 func FileServer(root FileSystem) Handler {
 	return &fileHandler{root}
 }
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
index e41b20a15b..f2d538b04a 100644
--- a/src/net/http/transport.go
+++ b/src/net/http/transport.go
@@ -1795,7 +1795,6 @@ var _ io.ReaderFrom = (*persistConnWriter)(nil)
 //	socks5://proxy.com|https|foo.com  socks5 to proxy, then https to foo.com
 //	https://proxy.com|https|foo.com   https to proxy, then CONNECT to foo.com
 //	https://proxy.com|http            https to proxy, http to anywhere after that
-//
 type connectMethod struct {
 	_            incomparable
 	proxyURL     *url.URL // nil for no proxy, else full proxy URL
diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go
index 157c59b17a..ac47f00700 100644
--- a/src/net/textproto/reader.go
+++ b/src/net/textproto/reader.go
@@ -88,7 +88,6 @@ func (r *Reader) readLineSlice() ([]byte, error) {
 // and the second will return "Line 2".
 //
 // Empty lines are never continued.
-//
 func (r *Reader) ReadContinuedLine() (string, error) {
 	line, err := r.readContinuedLineSlice(noValidation)
 	return string(line), err
@@ -230,7 +229,6 @@ func parseCodeLine(line string, expectCode int) (code int, continued bool, messa
 // If the response is multi-line, ReadCodeLine returns an error.
 //
 // An expectCode <= 0 disables the check of the status code.
-//
 func (r *Reader) ReadCodeLine(expectCode int) (code int, message string, err error) {
 	code, continued, message, err := r.readCodeLine(expectCode)
 	if err == nil && continued {
@@ -265,7 +263,6 @@ func (r *Reader) ReadCodeLine(expectCode int) (code int, message string, err err
 // the status is not in the range [310,319].
 //
 // An expectCode <= 0 disables the check of the status code.
-//
 func (r *Reader) ReadResponse(expectCode int) (code int, message string, err error) {
 	code, continued, message, err := r.readCodeLine(expectCode)
 	multi := continued
@@ -481,7 +478,6 @@ var colon = []byte(":")
 //		"My-Key": {"Value 1", "Value 2"},
 //		"Long-Key": {"Even Longer Value"},
 //	}
-//
 func (r *Reader) ReadMIMEHeader() (MIMEHeader, error) {
 	// Avoid lots of small slice allocations later by allocating one
 	// large one ahead of time which we'll cut up into smaller
diff --git a/src/net/textproto/textproto.go b/src/net/textproto/textproto.go
index cc1a847e4e..3487a7dfaf 100644
--- a/src/net/textproto/textproto.go
+++ b/src/net/textproto/textproto.go
@@ -110,7 +110,6 @@ func Dial(network, addr string) (*Conn, error) {
 //		return nil, err
 //	}
 //	return c.ReadCodeLine(250)
-//
 func (c *Conn) Cmd(format string, args ...any) (id uint, err error) {
 	id = c.Next()
 	c.StartRequest(id)
diff --git a/src/path/filepath/match.go b/src/path/filepath/match.go
index c77a26952a..847a78133d 100644
--- a/src/path/filepath/match.go
+++ b/src/path/filepath/match.go
@@ -40,7 +40,6 @@ var ErrBadPattern = errors.New("syntax error in pattern")
 //
 // On Windows, escaping is disabled. Instead, '\\' is treated as
 // path separator.
-//
 func Match(pattern, name string) (matched bool, err error) {
 Pattern:
 	for len(pattern) > 0 {
diff --git a/src/path/match.go b/src/path/match.go
index 918624c60e..673bbc7ff6 100644
--- a/src/path/match.go
+++ b/src/path/match.go
@@ -34,7 +34,6 @@ var ErrBadPattern = errors.New("syntax error in pattern")
 // Match requires pattern to match all of name, not just a substring.
 // The only possible returned error is ErrBadPattern, when pattern
 // is malformed.
-//
 func Match(pattern, name string) (matched bool, err error) {
 Pattern:
 	for len(pattern) > 0 {
diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go
index 06026232ee..5a35d98b51 100644
--- a/src/reflect/all_test.go
+++ b/src/reflect/all_test.go
@@ -6291,7 +6291,6 @@ func TestAllocsInterfaceSmall(t *testing.T) {
 //	[false false false false]
 //	...
 //	[true true true true]
-//
 type exhaustive struct {
 	r    *rand.Rand
 	pos  int
diff --git a/src/reflect/makefunc.go b/src/reflect/makefunc.go
index d0b0935cb8..e4acdc318b 100644
--- a/src/reflect/makefunc.go
+++ b/src/reflect/makefunc.go
@@ -43,7 +43,6 @@ type makeFuncImpl struct {
 //
 // The Examples section of the documentation includes an illustration
 // of how to use MakeFunc to build a swap function for different types.
-//
 func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value {
 	if typ.Kind() != Func {
 		panic("reflect: call of MakeFunc with non-Func type")
diff --git a/src/reflect/value.go b/src/reflect/value.go
index 89f0253570..7a20b6bd23 100644
--- a/src/reflect/value.go
+++ b/src/reflect/value.go
@@ -1830,7 +1830,6 @@ func (iter *MapIter) Reset(v Value) {
 //		v := iter.Value()
 //		...
 //	}
-//
 func (v Value) MapRange() *MapIter {
 	v.mustBe(Map)
 	return &MapIter{m: v}
@@ -2785,7 +2784,6 @@ const (
 // Normally Chan's underlying value must be a channel and Send must be a zero Value.
 // If Chan is a zero Value, then the case is ignored, but Send must still be a zero Value.
 // When a receive operation is selected, the received Value is returned by Select.
-//
 type SelectCase struct {
 	Dir  SelectDir // direction of case
 	Chan Value     // channel to use (for send or receive)
diff --git a/src/regexp/exec_test.go b/src/regexp/exec_test.go
index 5f8442668c..a6e833050b 100644
--- a/src/regexp/exec_test.go
+++ b/src/regexp/exec_test.go
@@ -62,7 +62,6 @@ import (
 //
 // At time of writing, re2-exhaustive.txt is 59 MB but compresses to 385 kB,
 // so we store re2-exhaustive.txt.bz2 in the repository and decompress it on the fly.
-//
 func TestRE2Search(t *testing.T) {
 	testRE2(t, "testdata/re2-search.txt")
 }
diff --git a/src/regexp/syntax/parse.go b/src/regexp/syntax/parse.go
index 0f6587ab27..fa45def9b7 100644
--- a/src/regexp/syntax/parse.go
+++ b/src/regexp/syntax/parse.go
@@ -449,7 +449,6 @@ func (p *parser) collapse(subs []*Regexp, op Op) *Regexp {
 //     A(B(C|D)|EF)|BC(X|Y)
 // which simplifies by character class introduction to
 //     A(B[CD]|EF)|BC[XY]
-//
 func (p *parser) factor(sub []*Regexp) []*Regexp {
 	if len(sub) < 2 {
 		return sub
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index 16fec26aeb..a16782ae94 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -683,7 +683,6 @@ func chanparkcommit(gp *g, chanLock unsafe.Pointer) bool {
 //	} else {
 //		... bar
 //	}
-//
 func selectnbsend(c *hchan, elem unsafe.Pointer) (selected bool) {
 	return chansend(c, elem, false, getcallerpc())
 }
@@ -704,7 +703,6 @@ func selectnbsend(c *hchan, elem unsafe.Pointer) (selected bool) {
 //	} else {
 //		... bar
 //	}
-//
 func selectnbrecv(elem unsafe.Pointer, c *hchan) (selected, received bool) {
 	return chanrecv(c, elem, false)
 }
diff --git a/src/runtime/compiler.go b/src/runtime/compiler.go
index 1ebc62dea1..f430a27719 100644
--- a/src/runtime/compiler.go
+++ b/src/runtime/compiler.go
@@ -9,5 +9,4 @@ package runtime
 //
 //	gc      Also known as cmd/compile.
 //	gccgo   The gccgo front end, part of the GCC compiler suite.
-//
 const Compiler = "gc"
diff --git a/src/runtime/lock_sema.go b/src/runtime/lock_sema.go
index db36df1f37..6961c2ea9b 100644
--- a/src/runtime/lock_sema.go
+++ b/src/runtime/lock_sema.go
@@ -23,7 +23,6 @@ import (
 //
 //	func semawakeup(mp *m)
 //		Wake up mp, which is or will soon be sleeping on its semaphore.
-//
 const (
 	locked uintptr = 1
 
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go
index d75efce7a8..e3cd6b9d2a 100644
--- a/src/runtime/pprof/pprof.go
+++ b/src/runtime/pprof/pprof.go
@@ -130,7 +130,6 @@ import (
 // The CPU profile is not available as a Profile. It has a special API,
 // the StartCPUProfile and StopCPUProfile functions, because it streams
 // output to a writer during profiling.
-//
 type Profile struct {
 	name  string
 	mu    sync.Mutex
@@ -276,7 +275,6 @@ func (p *Profile) Count() int {
 //
 // Passing skip=0 begins the stack trace at the call to Add inside rpc.NewClient.
 // Passing skip=1 begins the stack trace at the call to NewClient inside mypkg.Run.
-//
 func (p *Profile) Add(value any, skip int) {
 	if p.name == "" {
 		panic("pprof: use of uninitialized Profile")
diff --git a/src/runtime/profbuf.go b/src/runtime/profbuf.go
index f40881aed5..3d907d5612 100644
--- a/src/runtime/profbuf.go
+++ b/src/runtime/profbuf.go
@@ -84,7 +84,6 @@ import (
 //	if uint32(overflow) > 0 {
 //		emit entry for uint32(overflow), time
 //	}
-//
 type profBuf struct {
 	// accessed atomically
 	r, w         profAtomic
diff --git a/src/runtime/trace/annotation.go b/src/runtime/trace/annotation.go
index d05b5e2261..bf3dbc3d79 100644
--- a/src/runtime/trace/annotation.go
+++ b/src/runtime/trace/annotation.go
@@ -149,7 +149,6 @@ func WithRegion(ctx context.Context, regionType string, fn func()) {
 // Recommended usage is
 //
 //     defer trace.StartRegion(ctx, "myTracedRegion").End()
-//
 func StartRegion(ctx context.Context, regionType string) *Region {
 	if !IsEnabled() {
 		return noopRegion
diff --git a/src/sort/search.go b/src/sort/search.go
index fcff0f9491..601557a94b 100644
--- a/src/sort/search.go
+++ b/src/sort/search.go
@@ -55,7 +55,6 @@ package sort
 //		})
 //		fmt.Printf("Your number is %d.\n", answer)
 //	}
-//
 func Search(n int, f func(int) bool) int {
 	// Define f(-1) == false and f(n) == true.
 	// Invariant: f(i-1) == false, f(j) == true.
@@ -79,7 +78,6 @@ func Search(n int, f func(int) bool) int {
 // as specified by Search. The return value is the index to insert x if x is
 // not present (it could be len(a)).
 // The slice must be sorted in ascending order.
-//
 func SearchInts(a []int, x int) int {
 	return Search(len(a), func(i int) bool { return a[i] >= x })
 }
@@ -88,7 +86,6 @@ func SearchInts(a []int, x int) int {
 // as specified by Search. The return value is the index to insert x if x is not
 // present (it could be len(a)).
 // The slice must be sorted in ascending order.
-//
 func SearchFloat64s(a []float64, x float64) int {
 	return Search(len(a), func(i int) bool { return a[i] >= x })
 }
@@ -97,7 +94,6 @@ func SearchFloat64s(a []float64, x float64) int {
 // as specified by Search. The return value is the index to insert x if x is not
 // present (it could be len(a)).
 // The slice must be sorted in ascending order.
-//
 func SearchStrings(a []string, x string) int {
 	return Search(len(a), func(i int) bool { return a[i] >= x })
 }
diff --git a/src/sort/search_test.go b/src/sort/search_test.go
index ded68ebde0..f06897ee21 100644
--- a/src/sort/search_test.go
+++ b/src/sort/search_test.go
@@ -59,7 +59,6 @@ func TestSearch(t *testing.T) {
 
 // log2 computes the binary logarithm of x, rounded up to the next integer.
 // (log2(0) == 0, log2(1) == 0, log2(2) == 1, log2(3) == 2, etc.)
-//
 func log2(x int) int {
 	n := 0
 	for p := 1; p < x; p += p {
diff --git a/src/sort/sort.go b/src/sort/sort.go
index 2c197afc03..aed0eaba30 100644
--- a/src/sort/sort.go
+++ b/src/sort/sort.go
@@ -111,7 +111,6 @@ func (x Float64Slice) Len() int { return len(x) }
 // This implementation of Less places NaN values before any others, by using:
 //
 //	x[i] < x[j] || (math.IsNaN(x[i]) && !math.IsNaN(x[j]))
-//
 func (x Float64Slice) Less(i, j int) bool { return x[i] < x[j] || (isNaN(x[i]) && !isNaN(x[j])) }
 func (x Float64Slice) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }
 
diff --git a/src/strconv/itoa.go b/src/strconv/itoa.go
index 45e4192c82..b0c2666e7c 100644
--- a/src/strconv/itoa.go
+++ b/src/strconv/itoa.go
@@ -85,7 +85,6 @@ const digits = "0123456789abcdefghijklmnopqrstuvwxyz"
 // set, the string is appended to dst and the resulting byte slice is
 // returned as the first result value; otherwise the string is returned
 // as the second result value.
-//
 func formatBits(dst []byte, u uint64, base int, neg, append_ bool) (d []byte, s string) {
 	if base < 2 || base > len(digits) {
 		panic("strconv: illegal AppendInt/FormatInt base")
diff --git a/src/sync/cond.go b/src/sync/cond.go
index b254c9360a..d86ebc8b50 100644
--- a/src/sync/cond.go
+++ b/src/sync/cond.go
@@ -48,7 +48,6 @@ func NewCond(l Locker) *Cond {
 //    }
 //    ... make use of condition ...
 //    c.L.Unlock()
-//
 func (c *Cond) Wait() {
 	c.checker.check()
 	t := runtime_notifyListAdd(&c.notify)
diff --git a/src/sync/once.go b/src/sync/once.go
index 8844314e7e..e5ba257d87 100644
--- a/src/sync/once.go
+++ b/src/sync/once.go
@@ -38,7 +38,6 @@ type Once struct {
 //
 // If f panics, Do considers it to have returned; future calls of Do return
 // without calling f.
-//
 func (o *Once) Do(f func()) {
 	// Note: Here is an incorrect implementation of Do:
 	//
diff --git a/src/testing/fstest/testfs.go b/src/testing/fstest/testfs.go
index 9a65fbbd0b..ddb6080882 100644
--- a/src/testing/fstest/testfs.go
+++ b/src/testing/fstest/testfs.go
@@ -33,7 +33,6 @@ import (
 //	if err := fstest.TestFS(myFS, "file/that/should/be/present"); err != nil {
 //		t.Fatal(err)
 //	}
-//
 func TestFS(fsys fs.FS, expected ...string) error {
 	if err := testFS(fsys, expected...); err != nil {
 		return err
diff --git a/src/text/scanner/scanner.go b/src/text/scanner/scanner.go
index 735982afcb..44be0b6bd4 100644
--- a/src/text/scanner/scanner.go
+++ b/src/text/scanner/scanner.go
@@ -60,7 +60,6 @@ func (pos Position) String() string {
 //
 // Use GoTokens to configure the Scanner such that it accepts all Go
 // literal tokens including Go identifiers. Comments will be skipped.
-//
 const (
 	ScanIdents     = 1 << -Ident
 	ScanInts       = 1 << -Int
diff --git a/src/text/tabwriter/tabwriter.go b/src/text/tabwriter/tabwriter.go
index 76dec7b358..d4cfcf556a 100644
--- a/src/text/tabwriter/tabwriter.go
+++ b/src/text/tabwriter/tabwriter.go
@@ -23,7 +23,6 @@ import (
 // The text itself is stored in a separate buffer; cell only describes the
 // segment's size in bytes, its width in runes, and whether it's an htab
 // ('\t') terminated cell.
-//
 type cell struct {
 	size  int  // cell size in bytes
 	width int  // cell width in runes
@@ -87,7 +86,6 @@ type cell struct {
 // The Writer must buffer input internally, because proper spacing
 // of one line may depend on the cells in future lines. Clients must
 // call Flush when done calling Write.
-//
 type Writer struct {
 	// configuration
 	output   io.Writer
@@ -207,7 +205,6 @@ const (
 //			(for correct-looking results, tabwidth must correspond
 //			to the tab width in the viewer displaying the result)
 //	flags		formatting control
-//
 func (b *Writer) Init(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer {
 	if minwidth < 0 || tabwidth < 0 || padding < 0 {
 		panic("negative minwidth, tabwidth, or padding")
@@ -350,7 +347,6 @@ func (b *Writer) writeLines(pos0 int, line0, line1 int) (pos int) {
 // is the buffer position corresponding to the beginning of line0.
 // Returns the buffer position corresponding to the beginning of
 // line1 and an error, if any.
-//
 func (b *Writer) format(pos0 int, line0, line1 int) (pos int) {
 	pos = pos0
 	column := len(b.widths)
@@ -427,7 +423,6 @@ func (b *Writer) updateWidth() {
 // width one for formatting purposes.
 //
 // The value 0xff was chosen because it cannot appear in a valid UTF-8 sequence.
-//
 const Escape = '\xff'
 
 // Start escaped mode.
@@ -446,7 +441,6 @@ func (b *Writer) startEscape(ch byte) {
 // is assumed to be zero for formatting purposes; if it was an HTML entity,
 // its width is assumed to be one. In all other cases, the width is the
 // unicode width of the text.
-//
 func (b *Writer) endEscape() {
 	switch b.endChar {
 	case Escape:
@@ -464,7 +458,6 @@ func (b *Writer) endEscape() {
 
 // Terminate the current cell by adding it to the list of cells of the
 // current line. Returns the number of cells in that line.
-//
 func (b *Writer) terminateCell(htab bool) int {
 	b.cell.htab = htab
 	line := &b.lines[len(b.lines)-1]
@@ -526,7 +519,6 @@ var hbar = []byte("---\n")
 // Write writes buf to the writer b.
 // The only errors returned are ones encountered
 // while writing to the underlying output stream.
-//
 func (b *Writer) Write(buf []byte) (n int, err error) {
 	defer b.handlePanic(&err, "Write")
 
@@ -603,7 +595,6 @@ func (b *Writer) Write(buf []byte) (n int, err error) {
 
 // NewWriter allocates and initializes a new tabwriter.Writer.
 // The parameters are the same as for the Init function.
-//
 func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer {
 	return new(Writer).Init(output, minwidth, tabwidth, padding, padchar, flags)
 }
diff --git a/src/text/template/option.go b/src/text/template/option.go
index 1035afad72..8d7d436bd0 100644
--- a/src/text/template/option.go
+++ b/src/text/template/option.go
@@ -38,7 +38,6 @@ type option struct {
 //		The operation returns the zero value for the map type's element.
 //	"missingkey=error"
 //		Execution stops immediately with an error.
-//
 func (t *Template) Option(opt ...string) *Template {
 	t.init()
 	for _, s := range opt {
diff --git a/src/time/format.go b/src/time/format.go
index 33e6543289..95fe08b772 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -87,7 +87,6 @@ import "errors"
 //
 // Some valid layouts are invalid time values for time.Parse, due to formats
 // such as _ for space padding and Z for zone information.
-//
 const (
 	Layout      = "01/02 03:04:05PM '06 -0700" // The reference time, in numerical order.
 	ANSIC       = "Mon Jan _2 15:04:05 2006"
diff --git a/src/time/time.go b/src/time/time.go
index d77074c5c2..88301ec16b 100644
--- a/src/time/time.go
+++ b/src/time/time.go
@@ -123,7 +123,6 @@ import (
 // to t == u, since t.Equal uses the most accurate comparison available and
 // correctly handles the case when only one of its arguments has a monotonic
 // clock reading.
-//
 type Time struct {
 	// wall and ext encode the wall time seconds, wall time nanoseconds,
 	// and optional monotonic clock reading in nanoseconds.
@@ -603,7 +602,6 @@ const (
 // To convert an integer number of units to a Duration, multiply:
 //	seconds := 10
 //	fmt.Print(time.Duration(seconds)*time.Second) // prints 10s
-//
 const (
 	Nanosecond  Duration = 1
 	Microsecond          = 1000 * Nanosecond
diff --git a/src/unicode/letter.go b/src/unicode/letter.go
index 268e457a87..f4c950a883 100644
--- a/src/unicode/letter.go
+++ b/src/unicode/letter.go
@@ -334,7 +334,6 @@ type foldPair struct {
 //	SimpleFold('1') = '1'
 //
 //	SimpleFold(-2) = -2
-//
 func SimpleFold(r rune) rune {
 	if r < 0 || r > MaxRune {
 		return r
diff --git a/src/unsafe/unsafe.go b/src/unsafe/unsafe.go
index a6a255658b..4a3d7feda7 100644
--- a/src/unsafe/unsafe.go
+++ b/src/unsafe/unsafe.go
@@ -180,7 +180,6 @@ type IntegerType int
 //	hdr.Data = uintptr(unsafe.Pointer(p))
 //	hdr.Len = n
 //	s := *(*string)(unsafe.Pointer(&hdr)) // p possibly already lost
-//
 type Pointer *ArbitraryType
 
 // Sizeof takes an expression x of any type and returns the size in bytes
-- 
cgit v1.3