Commit 0e275a0a6d for golang
commit 0e275a0a6de0911926ae87ade956b46f9231ff94
Author: cuishuang <imcusg@gmail.com>
Date: Wed Nov 25 08:31:44 2026 +0800
all: correct and clarify struct field comments
Fix stale field names in comments and clarify mulWideF fallback
behavior.
Change-Id: I1dd5bcb2d1d2a98c59b30196da11455c6b13c36b
Reviewed-on: https://go-review.googlesource.com/c/go/+/867282
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go
index 73e881ef3c..2aed832ab4 100644
--- a/src/cmd/go/internal/modload/buildlist.go
+++ b/src/cmd/go/internal/modload/buildlist.go
@@ -670,7 +670,7 @@ func overrideRoots(ld *Loader, ctx context.Context, rs *Requirements, replace []
// A ConstraintError describes inconsistent constraints in EditBuildList
type ConstraintError struct {
- // Conflict lists the source of the conflict for each version in mustSelect
+ // Conflicts lists the source of the conflict for each version in mustSelect
// that could not be selected due to the requirements of some other version in
// mustSelect.
Conflicts []Conflict
diff --git a/src/crypto/tls/cipher_suites.go b/src/crypto/tls/cipher_suites.go
index aff2f810a6..faa3156eba 100644
--- a/src/crypto/tls/cipher_suites.go
+++ b/src/crypto/tls/cipher_suites.go
@@ -33,7 +33,7 @@ type CipherSuite struct {
ID uint16
Name string
- // Supported versions is the list of TLS protocol versions that can
+ // SupportedVersions is the list of TLS protocol versions that can
// negotiate this cipher suite.
SupportedVersions []uint16
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go
index 86d8ae3c69..18341c1387 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -109,7 +109,7 @@ type Flags struct {
// GreenTeaGC enables the Green Tea GC implementation.
GreenTeaGC bool
- // RandomizedHeapBase enables heap base address randomization on 64-bit
+ // RandomizedHeapBase64 enables heap base address randomization on 64-bit
// platforms.
RandomizedHeapBase64 bool
diff --git a/src/internal/trace/event.go b/src/internal/trace/event.go
index ef4aa664b8..e985850495 100644
--- a/src/internal/trace/event.go
+++ b/src/internal/trace/event.go
@@ -230,7 +230,7 @@ type Task struct {
// This can be used to associate the beginning of a task with its end.
ID TaskID
- // ParentID is the ID of the parent task.
+ // Parent is the ID of the parent task.
Parent TaskID
// Type is the taskType that was passed to runtime/trace.NewTask.
diff --git a/src/math/big/internal/asmgen/arch.go b/src/math/big/internal/asmgen/arch.go
index adfcff9384..b943384dc0 100644
--- a/src/math/big/internal/asmgen/arch.go
+++ b/src/math/big/internal/asmgen/arch.go
@@ -91,10 +91,9 @@ type Arch struct {
addF func(a *Asm, src1, src2, dst Reg, carry Carry) bool
subF func(a *Asm, src1, src2, dst Reg, carry Carry) bool
- // mulF and mulWideF implement Mul and MulWide.
- // They call Fatalf if the operation is unsupported.
- // An architecture can set the mul field instead of mulF.
- // mulWide is optional, but otherwise mulhi should be set.
+ // mulWideF optionally implements MulWide for the architecture.
+ // If nil, MulWide uses the mul and mulhi instructions for the requested outputs,
+ // calling Fatalf if the operation is unsupported.
mulWideF func(a *Asm, src1, src2, dstlo, dsthi Reg)
// addWords is a printf format taking src1, src2, dst
diff --git a/src/simd/archsimd/_gen/simdgen/types/operation.go b/src/simd/archsimd/_gen/simdgen/types/operation.go
index 41eb5b863e..bb93cc2d13 100644
--- a/src/simd/archsimd/_gen/simdgen/types/operation.go
+++ b/src/simd/archsimd/_gen/simdgen/types/operation.go
@@ -98,7 +98,7 @@ type RawOperation struct {
FalseDep *bool // true => the instruction has a false dependency on its output register
Documentation *string // Documentation will be appended to the stubs comments.
AddDoc *string // Additional doc to be appended.
- // ConstMask is a hack to reduce the size of defs the user writes for const-immediate
+ // ConstImm is a hack to reduce the size of defs the user writes for const-immediate
// If present, it will be copied to [In[0].Const].
ConstImm *string
// NameAndSizeCheck is used to check [BWDQ] maps to (8|16|32|64) elemBits.