1
0
mirror of https://github.com/golang/go synced 2024-11-11 19:21:37 -07:00

all: fix function names in comments

Change-Id: I915eff34fcfe82f3514254f7d8998baa88a91da6
Reviewed-on: https://go-review.googlesource.com/c/go/+/501997
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
cui fliter 2023-06-09 10:08:27 +08:00 committed by Gopher Robot
parent 19b814b80b
commit 39effbc105
5 changed files with 6 additions and 5 deletions

View File

@ -3325,7 +3325,7 @@ func (c *typeConv) badVoidPointerTypedef(dt *dwarf.TypedefType) bool {
return false return false
} }
// badStructPointerTypedef is like badVoidPointerTypedefs but for structs. // badStructPointerTypedef is like badVoidPointerTypedef but for structs.
func (c *typeConv) badStructPointerTypedef(name string, dt *dwarf.StructType) bool { func (c *typeConv) badStructPointerTypedef(name string, dt *dwarf.StructType) bool {
// Windows handle types can all potentially contain non-pointers. // Windows handle types can all potentially contain non-pointers.
// badVoidPointerTypedef handles the "void *" HANDLE type, but other // badVoidPointerTypedef handles the "void *" HANDLE type, but other

View File

@ -1036,7 +1036,7 @@ func (l *Loader) SetAttrCgoExportDynamic(i Sym, v bool) {
} }
} }
// ForAllAttrCgoExportDynamic calls f for every symbol that has been // ForAllCgoExportDynamic calls f for every symbol that has been
// marked with the "cgo_export_dynamic" compiler directive. // marked with the "cgo_export_dynamic" compiler directive.
func (l *Loader) ForAllCgoExportDynamic(f func(Sym)) { func (l *Loader) ForAllCgoExportDynamic(f func(Sym)) {
for s := range l.attrCgoExportDynamic { for s := range l.attrCgoExportDynamic {

View File

@ -67,7 +67,7 @@ func marshalECPrivateKeyWithOID(key *ecdsa.PrivateKey, oid asn1.ObjectIdentifier
}) })
} }
// marshalECPrivateKeyWithOID marshals an EC private key into ASN.1, DER format // marshalECDHPrivateKey marshals an EC private key into ASN.1, DER format
// suitable for NIST curves. // suitable for NIST curves.
func marshalECDHPrivateKey(key *ecdh.PrivateKey) ([]byte, error) { func marshalECDHPrivateKey(key *ecdh.PrivateKey) ([]byte, error) {
return asn1.Marshal(ecPrivateKey{ return asn1.Marshal(ecPrivateKey{

View File

@ -813,7 +813,7 @@ func (p *printer) intersperseComments(next token.Position, tok token.Token) (wro
return return
} }
// whiteWhitespace writes the first n whitespace entries. // writeWhitespace writes the first n whitespace entries.
func (p *printer) writeWhitespace(n int) { func (p *printer) writeWhitespace(n int) {
// write entries // write entries
for i := 0; i < n; i++ { for i := 0; i < n; i++ {

View File

@ -180,7 +180,7 @@ func setUpdate(update func(string, string))
//go:linkname registerMetric //go:linkname registerMetric
func registerMetric(name string, read func() uint64) func registerMetric(name string, read func() uint64)
// setNewNonDefaultInc is provided by package runtime. // setNewIncNonDefault is provided by package runtime.
// The runtime can do // The runtime can do
// //
// inc := newNonDefaultInc(name) // inc := newNonDefaultInc(name)
@ -285,5 +285,6 @@ func (*runtimeStderr) Write(b []byte) (int, error) {
// Since we cannot import os or syscall, use the runtime's write function // Since we cannot import os or syscall, use the runtime's write function
// to print to standard error. // to print to standard error.
//
//go:linkname write runtime.write //go:linkname write runtime.write
func write(fd uintptr, p unsafe.Pointer, n int32) int32 func write(fd uintptr, p unsafe.Pointer, n int32) int32