]> Cypherpunks repositories - gostls13.git/commitdiff
cmd: fix a few function names on comments
authorcui fliter <imcusg@gmail.com>
Thu, 29 Sep 2022 12:46:10 +0000 (12:46 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 29 Sep 2022 22:58:11 +0000 (22:58 +0000)
Change-Id: Ia0896bd1edf2558821244fecd1c297b599472f47
GitHub-Last-Rev: cfd1e1091a064cdc38469c02c6c013635d7d437b
GitHub-Pull-Request: golang/go#55944
Reviewed-on: https://go-review.googlesource.com/c/go/+/436637
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/dist/util.go
src/cmd/fix/typecheck.go
src/cmd/go/internal/fsys/fsys.go
src/cmd/go/internal/modindex/scan.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/workcmd/edit.go
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/goobj/mkbuiltin.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/util.go
src/cmd/link/internal/wasm/asm.go

index fc1bfcf9b8a7f5de40cfeef32bf663ec860e9684..a4d49f4614588538f454384e5fc325fdad4b3e92 100644 (file)
@@ -309,7 +309,7 @@ func xreaddir(dir string) []string {
        return names
 }
 
-// xreaddir replaces dst with a list of the names of the files in dir.
+// xreaddirfiles replaces dst with a list of the names of the files in dir.
 // The names are relative to dir; they are not full paths.
 func xreaddirfiles(dir string) []string {
        f, err := os.Open(dir)
index 015a0eef2f8611397a5012ae6b0fa51e0f3cb3d9..27042e05a5506046a003caab5eb464c18b4b9af4 100644 (file)
@@ -293,7 +293,7 @@ func makeExprList(a []*ast.Ident) []ast.Expr {
        return b
 }
 
-// Typecheck1 is the recursive form of typecheck.
+// typecheck1 is the recursive form of typecheck.
 // It is like typecheck but adds to the information in typeof
 // instead of allocating a new map.
 func typecheck1(cfg *TypeConfig, f any, typeof map[any]string, assign map[string][]any) {
index f6abec42ffd7b89c17aac6a360907ad25a32692b..7ff4538d41e7c90b96a827489a297d0b41072f95 100644 (file)
@@ -94,7 +94,7 @@ func (n *node) isDeleted() bool {
 var overlay map[string]*node // path -> file or directory node
 var cwd string               // copy of base.Cwd() to avoid dependency
 
-// Canonicalize a path for looking it up in the overlay.
+// canonicalize a path for looking it up in the overlay.
 // Important: filepath.Join(cwd, path) doesn't always produce
 // the correct absolute path if path is relative, because on
 // Windows producing the correct absolute path requires making
@@ -507,7 +507,7 @@ func Walk(root string, walkFn filepath.WalkFunc) error {
        return err
 }
 
-// lstat implements a version of os.Lstat that operates on the overlay filesystem.
+// Lstat implements a version of os.Lstat that operates on the overlay filesystem.
 func Lstat(path string) (fs.FileInfo, error) {
        Trace("Lstat", path)
        return overlayStat(path, os.Lstat, "lstat")
index d3f059bcfc6a9534009e379d247e064d6cde8046..56ba9e86c865d27e39b1ce37c1ee250c84ac0d2e 100644 (file)
@@ -69,7 +69,7 @@ func indexModule(modroot string) ([]byte, error) {
        return encodeModuleBytes(packages), nil
 }
 
-// indexModule indexes the package at the given directory and returns its
+// indexPackage indexes the package at the given directory and returns its
 // encoded representation. It returns ErrNotIndexed if the package can't
 // be indexed.
 func indexPackage(modroot, pkgdir string) []byte {
@@ -115,7 +115,7 @@ func parseErrorToString(err error) string {
        return string(s)
 }
 
-// parseErrorFrom string converts a string produced by parseErrorToString back
+// parseErrorFromString converts a string produced by parseErrorToString back
 // to an error.  An empty string is converted to a nil error, and all
 // other strings are expected to be JSON-marshalled parseError structs.
 // The two functions are meant to preserve the structure of an
index 8c610a00335643564733ecb67d022931580eade9..7da2bebdb8fd1a2043335748ee3d22c90a54f34d 100644 (file)
@@ -1665,7 +1665,7 @@ const (
        addBuildListZipSums
 )
 
-// modKey returns the module.Version under which the checksum for m's go.mod
+// modkey returns the module.Version under which the checksum for m's go.mod
 // file is stored in the go.sum file.
 func modkey(m module.Version) module.Version {
        return module.Version{Path: m.Path, Version: m.Version + "/go.mod"}
index 1478c19389fa1f98ca834c9ff4ffe7abd0608801..a0b96cd730daa342be3057d06821a21dd1fef4c9 100644 (file)
@@ -235,7 +235,7 @@ func parsePathVersionOptional(adj, arg string, allowDirPath bool) (path, version
        return path, version, nil
 }
 
-// flagReplace implements the -replace flag.
+// flagEditworkReplace implements the -replace flag.
 func flagEditworkReplace(arg string) {
        var i int
        if i = strings.Index(arg, "="); i < 0 {
@@ -264,7 +264,7 @@ func flagEditworkReplace(arg string) {
        })
 }
 
-// flagDropReplace implements the -dropreplace flag.
+// flagEditworkDropReplace implements the -dropreplace flag.
 func flagEditworkDropReplace(arg string) {
        path, version, err := parsePathVersionOptional("old", arg, true)
        if err != nil {
index 4821efa963edcd59a414cb29a57f291290050fe5..18800f7948ef15d5b77e05bafb2523ccf06a19e2 100644 (file)
@@ -396,7 +396,7 @@ func expandPseudoForm(form uint8) uint8 {
        return uint8(expandedForm)
 }
 
-// Abbrevs() returns the finalized abbrev array for the platform,
+// Abbrevs returns the finalized abbrev array for the platform,
 // expanding any DW_FORM pseudo-ops to real values.
 func Abbrevs() []dwAbbrev {
        if abbrevsFinalized {
@@ -1719,7 +1719,7 @@ func (s byChildIndex) Len() int           { return len(s) }
 func (s byChildIndex) Less(i, j int) bool { return s[i].ChildIndex < s[j].ChildIndex }
 func (s byChildIndex) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }
 
-// IsDWARFEnabledOnAIX returns true if DWARF is possible on the
+// IsDWARFEnabledOnAIXLd returns true if DWARF is possible on the
 // current extld.
 // AIX ld doesn't support DWARF with -bnoobjreorder with version
 // prior to 7.2.2.
index d96ac41c1a46a199bc4085779d5934f5a7862082..57e39dc47e46fc364fc147e591132da53c0af1b3 100644 (file)
@@ -116,7 +116,7 @@ func mkbuiltin(w io.Writer) {
        fmt.Fprintln(w, "}")
 }
 
-// addBasicTypes returns the symbol names for basic types that are
+// enumerateBasicTypes returns the symbol names for basic types that are
 // defined in the runtime and referenced in other packages.
 // Needs to be kept in sync with reflect.go:WriteBasicTypes() and
 // reflect.go:writeType() in the compiler.
index 49b425b12415639c0dcbba1d703b32e9b69084ee..ea2d59492f0f002c3a9f8730a14f9c860ee4b701 100644 (file)
@@ -369,7 +369,7 @@ type PCIter struct {
        Done    bool
 }
 
-// newPCIter creates a PCIter with a scale factor for the PC step size.
+// NewPCIter creates a PCIter with a scale factor for the PC step size.
 func NewPCIter(pcScale uint32) *PCIter {
        it := new(PCIter)
        it.PCScale = pcScale
index 55b3dd26edc3daaa9d16deefb4e462cf576c057e..b219a07063a8adaf0ea6780c4907146f0207f2f5 100644 (file)
@@ -233,7 +233,7 @@ func Dconv(p *Prog, a *Addr) string {
        return buf.String()
 }
 
-// DconvDconvWithABIDetail accepts an argument 'a' within a prog 'p'
+// DconvWithABIDetail accepts an argument 'a' within a prog 'p'
 // and returns a string with a formatted version of the argument, in
 // which text symbols are rendered with explicit ABI selectors.
 func DconvWithABIDetail(p *Prog, a *Addr) string {
index 041b4e27802106ea89809ac27031cdb50f482f8e..0aa065f99de64fc67c2aebf54a85a4c28f2b7d25 100644 (file)
@@ -412,7 +412,7 @@ func writeElementSec(ctxt *ld.Link, numImports, numFns uint64) {
        writeSecSize(ctxt, sizeOffset)
 }
 
-// writeElementSec writes the section that provides the function bodies for the functions
+// writeCodeSec writes the section that provides the function bodies for the functions
 // declared by the "func" section.
 func writeCodeSec(ctxt *ld.Link, fns []*wasmFunc) {
        sizeOffset := writeSecHeader(ctxt, sectionCode)