]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: fix problematic comments
authorcui fliter <imcusg@gmail.com>
Sun, 29 Jan 2023 06:40:22 +0000 (14:40 +0800)
committerThan McIntosh <thanm@google.com>
Mon, 30 Jan 2023 18:10:36 +0000 (18:10 +0000)
Change-Id: If092ae7c72b66f172ae32fa6c7294a7ac250362e
Reviewed-on: https://go-review.googlesource.com/c/go/+/463995
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>

src/cmd/internal/obj/sym.go
src/cmd/internal/src/pos.go
src/cmd/link/internal/benchmark/bench.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/loader/loader.go
src/cmd/pprof/readlineui.go
src/crypto/internal/edwards25519/field/fe_generic.go
src/crypto/tls/conn.go
src/encoding/gob/encode.go
src/fmt/scan.go

index e5b052c5377c40fc0675b1c9cc419844c7df3005..e0817d5f743fe106dc84b5b9d035da5fe246d5fd 100644 (file)
@@ -85,7 +85,7 @@ func (ctxt *Link) LookupABI(name string, abi ABI) *LSym {
        return ctxt.LookupABIInit(name, abi, nil)
 }
 
-// LookupABI looks up a symbol with the given ABI.
+// LookupABIInit looks up a symbol with the given ABI.
 // If it does not exist, it creates it and
 // passes it to init for one-time initialization.
 func (ctxt *Link) LookupABIInit(name string, abi ABI, init func(s *LSym)) *LSym {
index 15f64acff832743a0d71311767345a3836b97a51..6f1c7dddbcf6c8128835a02652e76d0467cc3b84 100644 (file)
@@ -434,7 +434,7 @@ func (x lico) withIsStmt() lico {
        return x.withStmt(PosIsStmt)
 }
 
-// withLogue attaches a prologue/epilogue attribute to a lico
+// withXlogue attaches a prologue/epilogue attribute to a lico
 func (x lico) withXlogue(xlogue PosXlogue) lico {
        if x == 0 {
                if xlogue == 0 {
index 7c6f278264c77fbf1f192956f8eeee09c119b896..96fa04ae5b164c9e03c6dcf934d18e7f16367161 100644 (file)
@@ -106,7 +106,7 @@ func (m *Metrics) Report(w io.Writer) {
        fmt.Fprintf(w, "%s 1 %d ns/op\n", makeBenchString("total time"+gcString), totTime.Nanoseconds())
 }
 
-// Starts marks the beginning of a new measurement phase.
+// Start marks the beginning of a new measurement phase.
 // Once a metric is started, it continues until either a Report is issued, or another Start is called.
 func (m *Metrics) Start(name string) {
        if m == nil {
index d364e090e863652958e59b8a01a1a553b7340f93..8acf8aadb06fc459a326dcaaab241f815bd492ff 100644 (file)
@@ -127,7 +127,7 @@ func (ctxt *Link) mkArchSym(name string, ver int, ls *loader.Sym) {
        ctxt.loader.SetAttrReachable(*ls, true)
 }
 
-// mkArchVecSym is similar to  setArchSyms, but operates on elements within
+// mkArchSymVec is similar to  setArchSyms, but operates on elements within
 // a slice, where each element corresponds to some symbol version.
 func (ctxt *Link) mkArchSymVec(name string, ver int, ls []loader.Sym) {
        ls[ver] = ctxt.loader.LookupOrCreateSym(name, ver)
index 808b2180625b5486db15004c34a8cb0f668fa0dc..2ac17f4f163a0100ceb35d55e4090b5b451ed851 100644 (file)
@@ -1281,7 +1281,7 @@ func (l *Loader) SetSymAlign(i Sym, align int32) {
        l.align[i] = uint8(bits.Len32(uint32(align)))
 }
 
-// SymValue returns the section of the i-th symbol. i is global index.
+// SymSect returns the section of the i-th symbol. i is global index.
 func (l *Loader) SymSect(i Sym) *sym.Section {
        if int(i) >= len(l.symSects) {
                // symSects is extended lazily -- it the sym in question is
@@ -1320,7 +1320,7 @@ func (l *Loader) NewSection() *sym.Section {
        return sect
 }
 
-// SymDynImplib returns the "dynimplib" attribute for the specified
+// SymDynimplib returns the "dynimplib" attribute for the specified
 // symbol, making up a portion of the info for a symbol specified
 // on a "cgo_import_dynamic" compiler directive.
 func (l *Loader) SymDynimplib(i Sym) string {
@@ -1503,7 +1503,7 @@ func (l *Loader) SetSymDynid(i Sym, val int32) {
        }
 }
 
-// DynIdSyms returns the set of symbols for which dynID is set to an
+// DynidSyms returns the set of symbols for which dynID is set to an
 // interesting (non-default) value. This is expected to be a fairly
 // small set.
 func (l *Loader) DynidSyms() []Sym {
@@ -1836,7 +1836,7 @@ func (l *Loader) Relocs(i Sym) Relocs {
        return l.relocs(r, li)
 }
 
-// Relocs returns a Relocs object given a local sym index and reader.
+// relocs returns a Relocs object given a local sym index and reader.
 func (l *Loader) relocs(r *oReader, li uint32) Relocs {
        var rs []goobj.Reloc
        if l.isExtReader(r) {
index b269177650ae574ff382cd65c5ea3453b2b3dd97..b0f998f719559d8fbd994f80d2d0ed54b3e526d0 100644 (file)
@@ -51,7 +51,7 @@ func newReadlineUI() driver.UI {
        return &readlineUI{term: term.NewTerminal(rw, "")}
 }
 
-// Read returns a line of text (a command) read from the user.
+// ReadLine returns a line of text (a command) read from the user.
 // prompt is printed before reading the command.
 func (r *readlineUI) ReadLine(prompt string) (string, error) {
        r.term.SetPrompt(prompt)
index d6667b27be3ccf316e284f67c192577ddc07e109..3582df8b22f2f9e9b5d57631bb8b1c3a8b01920b 100644 (file)
@@ -245,7 +245,7 @@ func feSquareGeneric(v, a *Element) {
        v.carryPropagate()
 }
 
-// carryPropagate brings the limbs below 52 bits by applying the reduction
+// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
 // identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry.
 func (v *Element) carryPropagateGeneric() *Element {
        c0 := v.l0 >> 51
index 03c72633be1fd8defb51c0bf5aa7e1210bd8e800..fc65d87aaf96b50e2348480d71f3cac7fb64b9f2 100644 (file)
@@ -811,7 +811,7 @@ func (c *Conn) readFromUntil(r io.Reader, n int) error {
        return err
 }
 
-// sendAlert sends a TLS alert message.
+// sendAlertLocked sends a TLS alert message.
 func (c *Conn) sendAlertLocked(err alert) error {
        switch err {
        case alertNoRenegotiation, alertCloseNotify:
index 38430342b61c9def17427f0894473d10811bd5a6..abc76701cacbe93e6bc9e896378a9b61b56fe2b8 100644 (file)
@@ -465,7 +465,7 @@ func isZero(val reflect.Value) bool {
        panic("unknown type in isZero " + val.Type().String())
 }
 
-// encGobEncoder encodes a value that implements the GobEncoder interface.
+// encodeGobEncoder encodes a value that implements the GobEncoder interface.
 // The data is sent as a byte array.
 func (enc *Encoder) encodeGobEncoder(b *encBuffer, ut *userTypeInfo, v reflect.Value) {
        // TODO: should we catch panics from the called method?
index d38610df35595fedd172662b1c0733393b715231..2780b82de276acc3393a33547e8ca0a669e48184 100644 (file)
@@ -803,7 +803,7 @@ func (s *ss) convertFloat(str string, n int) float64 {
        return f
 }
 
-// convertComplex converts the next token to a complex128 value.
+// scanComplex converts the next token to a complex128 value.
 // The atof argument is a type-specific reader for the underlying type.
 // If we're reading complex64, atof will parse float32s and convert them
 // to float64's to avoid reproducing this code for each complex type.