Skip to content

Commit

Permalink
all: fix function names in comments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cuishuang authored and gopherbot committed Jun 9, 2023
1 parent 19b814b commit 39effbc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cmd/cgo/gcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3325,7 +3325,7 @@ func (c *typeConv) badVoidPointerTypedef(dt *dwarf.TypedefType) bool {
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 {
// Windows handle types can all potentially contain non-pointers.
// badVoidPointerTypedef handles the "void *" HANDLE type, but other
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (l *Loader) ForAllCgoExportDynamic(f func(Sym)) {
for s := range l.attrCgoExportDynamic {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/x509/sec1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func marshalECDHPrivateKey(key *ecdh.PrivateKey) ([]byte, error) {
return asn1.Marshal(ecPrivateKey{
Expand Down
2 changes: 1 addition & 1 deletion src/go/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func (p *printer) intersperseComments(next token.Position, tok token.Token) (wro
return
}

// whiteWhitespace writes the first n whitespace entries.
// writeWhitespace writes the first n whitespace entries.
func (p *printer) writeWhitespace(n int) {
// write entries
for i := 0; i < n; i++ {
Expand Down
3 changes: 2 additions & 1 deletion src/internal/godebug/godebug.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func setUpdate(update func(string, string))
//go:linkname registerMetric
func registerMetric(name string, read func() uint64)

// setNewNonDefaultInc is provided by package runtime.
// setNewIncNonDefault is provided by package runtime.
// The runtime can do
//
// inc := newNonDefaultInc(name)
Expand Down Expand Up @@ -285,5 +285,6 @@ func (*runtimeStderr) Write(b []byte) (int, error) {

// Since we cannot import os or syscall, use the runtime's write function
// to print to standard error.
//
//go:linkname write runtime.write
func write(fd uintptr, p unsafe.Pointer, n int32) int32

0 comments on commit 39effbc

Please sign in to comment.