]> Cypherpunks repositories - gostls13.git/commitdiff
all: correct name for comments
authorJes Cok <xigua67damn@gmail.com>
Thu, 16 Oct 2025 01:16:02 +0000 (01:16 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 17 Oct 2025 16:52:21 +0000 (09:52 -0700)
Change-Id: I390c380349e99ad421264b673ad7734eddb639d3
GitHub-Last-Rev: 32e849a6420574b0d878b9a449a8c044fd6ebdd1
GitHub-Pull-Request: golang/go#75905
Reviewed-on: https://go-review.googlesource.com/c/go/+/711941
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
20 files changed:
src/cmd/compile/internal/bitvec/bv.go
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/s390x/ggen.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/types2/object.go
src/cmd/go/internal/vet/vet.go
src/cmd/internal/obj/x86/evex.go
src/cmd/internal/objfile/goobj.go
src/cmd/link/internal/loader/symbolbuilder.go
src/crypto/internal/fips140/rsa/pkcs1v22.go
src/crypto/x509/oid.go
src/debug/dwarf/entry.go
src/go/scanner/scanner.go
src/go/types/object.go
src/internal/coverage/cmerge/merge.go
src/internal/goarch/goarch.go
src/internal/runtime/maps/table.go
src/internal/trace/event.go
src/runtime/mspanset.go
src/text/template/parse/parse.go

index d3133dcd2dc679912d41d3f5452f9bd0b1d8f6bb..9214aa6cd05560aa6253d8b16143de26f5f13563 100644 (file)
@@ -93,7 +93,7 @@ func (bv BitVec) Unset(i int32) {
        bv.B[i/wordBits] &^= mask
 }
 
-// bvnext returns the smallest index >= i for which bvget(bv, i) == 1.
+// Next returns the smallest index >= i for which bvget(bv, i) == 1.
 // If there is no such index, bvnext returns -1.
 func (bv BitVec) Next(i int32) int32 {
        if i >= bv.N {
index 037957b676a03315a73a986946fdfbe5ef176544..7a75ff40f2d609e718275399621d9c57020a3bd5 100644 (file)
@@ -617,7 +617,7 @@ func (o Op) IsSlice3() bool {
        return false
 }
 
-// A SliceHeader expression constructs a slice header from its parts.
+// A SliceHeaderExpr constructs a slice header from its parts.
 type SliceHeaderExpr struct {
        miniExpr
        Ptr Node
@@ -665,7 +665,7 @@ func NewStarExpr(pos src.XPos, x Node) *StarExpr {
 func (n *StarExpr) Implicit() bool     { return n.flags&miniExprImplicit != 0 }
 func (n *StarExpr) SetImplicit(b bool) { n.flags.set(miniExprImplicit, b) }
 
-// A TypeAssertionExpr is a selector expression X.(Type).
+// A TypeAssertExpr is a selector expression X.(Type).
 // Before type-checking, the type is Ntype.
 type TypeAssertExpr struct {
        miniExpr
index 70e403122481e27ac676ddac656ad564ae75a063..c4f88e782623e6dbe3683d15ccae6543e4b71715 100644 (file)
@@ -11,7 +11,7 @@ import (
        "cmd/internal/obj/s390x"
 )
 
-// clearLoopCutOff is the (somewhat arbitrary) value above which it is better
+// clearLoopCutoff is the (somewhat arbitrary) value above which it is better
 // to have a loop of clear instructions (e.g. XCs) rather than just generating
 // multiple instructions (i.e. loop unrolling).
 // Must be between 256 and 4096.
index 6a3e9b512e72d54fbf280bf8caf1488b2d7f2be5..da859290f7a2564fb4978b2d2bd03a0c68e58261 100644 (file)
@@ -328,7 +328,7 @@ func (t *Type) funcType() *Func {
        return t.extra.(*Func)
 }
 
-// StructType contains Type fields specific to struct types.
+// Struct contains Type fields specific to struct types.
 type Struct struct {
        fields fields
 
index 463ed30308d0eeb5b3724ebb34f1b4dc53892d64..096b5653e53732bf0fda976674057d4d8e6d5fa1 100644 (file)
@@ -328,7 +328,7 @@ func (obj *TypeName) IsAlias() bool {
        }
 }
 
-// A Variable represents a declared variable (including function parameters and results, and struct fields).
+// A Var represents a declared variable (including function parameters and results, and struct fields).
 type Var struct {
        object
        origin   *Var // if non-nil, the Var from which this one was instantiated
index e274348bd6a38ea6a76709e5925a7ab5a86e4d09..f9579d498f573a2146eb1c7b9fc8711d09dfc1cf 100644 (file)
@@ -396,7 +396,7 @@ type jsonError struct {
        Err string `json:"error"`
 }
 
-// A TextEdit describes the replacement of a portion of a file.
+// A jsonTextEdit describes the replacement of a portion of a file.
 // Start and End are zero-based half-open indices into the original byte
 // sequence of the file, and New is the new text.
 type jsonTextEdit struct {
@@ -424,7 +424,7 @@ type jsonDiagnostic struct {
        Related        []jsonRelatedInformation `json:"related,omitempty"`
 }
 
-// A jsonRelated describes a secondary position and message related to
+// A jsonRelatedInformation describes a secondary position and message related to
 // a primary diagnostic.
 type jsonRelatedInformation struct {
        Posn    string `json:"posn"` // e.g. "file.go:line:column"
index aa93cd8819ac20c8391ac7af8daf4db577b9bb02..12fe0347046f69ea2a6ba6052169a1367a995180 100644 (file)
@@ -165,7 +165,7 @@ func evexZcase(zcase uint8) bool {
        return zcase > Zevex_first && zcase < Zevex_last
 }
 
-// evexSuffixBits carries instruction EVEX suffix set flags.
+// evexSuffix carries instruction EVEX suffix set flags.
 //
 // Examples:
 //
index e8b8b522516b9f8df4bf38aeef8dd43a605c8cd9..c428e29c9b19a438db354f218d10124f3e172881 100644 (file)
@@ -227,7 +227,7 @@ func (f *goobjFile) pcln() (textStart uint64, symtab, pclntab []byte, err error)
        return 0, nil, nil, fmt.Errorf("pcln not available in go object file")
 }
 
-// Find returns the file name, line, and function data for the given pc.
+// PCToLine returns the file name, line, and function data for the given pc.
 // Returns "",0,nil if unknown.
 // This function implements the Liner interface in preference to pcln() above.
 func (f *goobjFile) PCToLine(pc uint64) (string, int, *gosym.Func) {
index 35749f9ea9363ed855dd9d20e6c7d8207b0ee109..d385dec94a19c69ce0b1b16c388925303adf9e90 100644 (file)
@@ -139,7 +139,7 @@ func (sb *SymbolBuilder) SetRelocAdd(i int, a int64) {
        sb.relocs[i].SetAdd(a)
 }
 
-// SetRelocAdd sets the size of the 'i'-th relocation on this sym to 'sz'
+// SetRelocSiz sets the size of the 'i'-th relocation on this sym to 'sz'
 func (sb *SymbolBuilder) SetRelocSiz(i int, sz uint8) {
        sb.relocs[i].SetSiz(sz)
 }
index de7943773e63ac41fa6f9e5ee1e2c68f890aa957..94e7345996a46fb0302d3527ee735cc99d9b15d4 100644 (file)
@@ -316,7 +316,7 @@ func VerifyPSS(pub *PublicKey, hash hash.Hash, digest []byte, sig []byte) error
        return verifyPSS(pub, hash, digest, sig, pssSaltLengthAutodetect)
 }
 
-// VerifyPSS verifies sig with RSASSA-PSS and an expected salt length.
+// VerifyPSSWithSaltLength verifies sig with RSASSA-PSS and an expected salt length.
 func VerifyPSSWithSaltLength(pub *PublicKey, hash hash.Hash, digest []byte, sig []byte, saltLength int) error {
        if saltLength < 0 {
                return errors.New("crypto/rsa: salt length cannot be negative")
index b1464346b6b28ade0e50a9341d35a7f7f6387cb3..c60daa7540c830b51b168effcdc1353a0fb15112 100644 (file)
@@ -286,7 +286,7 @@ func (oid OID) EqualASN1OID(other asn1.ObjectIdentifier) bool {
        return i == len(other)
 }
 
-// Strings returns the string representation of the Object Identifier.
+// String returns the string representation of the Object Identifier.
 func (oid OID) String() string {
        var b strings.Builder
        b.Grow(32)
index 8741479483348e0c0cfb905af70560320a066df9..30fad93e7937d2e308575d67cb74e4e64ed0d443 100644 (file)
@@ -229,7 +229,7 @@ func formToClass(form format, attr Attr, vers int, b *buf) Class {
        }
 }
 
-// An entry is a sequence of attribute/value pairs.
+// An Entry is a sequence of attribute/value pairs.
 type Entry struct {
        Offset   Offset // offset of Entry in DWARF info
        Tag      Tag    // tag (kind of Entry)
index 153252b5cc3ebdd8c159c6d723f4a3e5e13435ef..cdbeb6323c6e80d63034b15819a6868c96f96ab6 100644 (file)
@@ -107,7 +107,7 @@ func (s *Scanner) peek() byte {
        return 0
 }
 
-// A mode value is a set of flags (or 0).
+// A Mode value is a set of flags (or 0).
 // They control scanner behavior.
 type Mode uint
 
index 1bba5d52a8b2b6b4eaaafca2a22b06297005ab63..27dcb71956dcb4574bf2da954addf704071efe83 100644 (file)
@@ -331,7 +331,7 @@ func (obj *TypeName) IsAlias() bool {
        }
 }
 
-// A Variable represents a declared variable (including function parameters and results, and struct fields).
+// A Var represents a declared variable (including function parameters and results, and struct fields).
 type Var struct {
        object
        origin   *Var // if non-nil, the Var from which this one was instantiated
index 1339803d0865c6dc37ceadf4c3e2dc101e27da8f..9fc548eced5091bcc0d6f7b1584a0bfb37b8b0df 100644 (file)
@@ -57,7 +57,7 @@ func (m *Merger) MergeCounters(dst, src []uint32) (error, bool) {
        return nil, ovf
 }
 
-// Saturating add does a saturating addition of 'dst' and 'src',
+// SaturatingAdd does a saturating addition of 'dst' and 'src',
 // returning added value or math.MaxUint32 if there is an overflow.
 // Overflows are recorded in case the client needs to track them.
 func (m *Merger) SaturatingAdd(dst, src uint32) uint32 {
@@ -68,7 +68,7 @@ func (m *Merger) SaturatingAdd(dst, src uint32) uint32 {
        return result
 }
 
-// Saturating add does a saturating addition of 'dst' and 'src',
+// SaturatingAdd does a saturating addition of 'dst' and 'src',
 // returning added value or math.MaxUint32 plus an overflow flag.
 func SaturatingAdd(dst, src uint32) (uint32, bool) {
        d, s := uint64(dst), uint64(src)
index 4da56dda9dadc120738c29a603a887d3d53b395d..efcf298d3b7b35227cf767fbf935f784b93488eb 100644 (file)
@@ -34,7 +34,7 @@ const (
 // It is also the size of the machine's native word size (that is, 4 on 32-bit systems, 8 on 64-bit).
 const PtrSize = 4 << (^uintptr(0) >> 63)
 
-// PtrSize is bit width of a pointer.
+// PtrBits is bit width of a pointer.
 const PtrBits = PtrSize * 8
 
 // ArchFamily is the architecture family (AMD64, ARM, ...)
index 73ea76766bad0f2e3737c398c8ee8ae011e26252..d9bcf23dfa04ed1a9a7e51f223fcdf8a0fc7baad 100644 (file)
@@ -716,7 +716,7 @@ func (it *Iter) Key() unsafe.Pointer {
        return it.key
 }
 
-// Key returns a pointer to the current element. nil indicates end of
+// Elem returns a pointer to the current element. nil indicates end of
 // iteration.
 //
 // Must not be called prior to Next.
index 321e4e21fb35fc1092a422e7d03f752ff945528d..b78e52329469d31cb8e3ba4d67e59008f948b78d 100644 (file)
@@ -197,7 +197,7 @@ type Range struct {
        Scope ResourceID
 }
 
-// RangeAttributes provides attributes about a completed Range.
+// RangeAttribute provides attributes about a completed Range.
 type RangeAttribute struct {
        // Name is the human-readable name for the range.
        Name string
index 21b105194e408aa40cc41e14280b454d8f8b7298..f0fb06286202f9b83719f11f7b6af5b8289edd1a 100644 (file)
@@ -407,7 +407,7 @@ func (p *atomicMSpanPointer) Load() *mspan {
        return (*mspan)(p.p.Load())
 }
 
-// Store stores an *mspan.
+// StoreNoWB stores an *mspan.
 func (p *atomicMSpanPointer) StoreNoWB(s *mspan) {
        p.p.StoreNoWB(unsafe.Pointer(s))
 }
index 84d639d78d16a90f8732df685eb6b5b54adc39ad..b74dfb7f4eaa5c6a7b5d4dc6164643121c1cf9aa 100644 (file)
@@ -35,7 +35,7 @@ type Tree struct {
        stackDepth int // depth of nested parenthesized expressions
 }
 
-// A mode value is a set of flags (or 0). Modes control parser behavior.
+// A Mode value is a set of flags (or 0). Modes control parser behavior.
 type Mode uint
 
 const (