mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
cmd: fix a few function names on comments
Change-Id: Ia0896bd1edf2558821244fecd1c297b599472f47
GitHub-Last-Rev: cfd1e1091a
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>
This commit is contained in:
parent
84c188008e
commit
c69d6d8b3e
2
src/cmd/dist/util.go
vendored
2
src/cmd/dist/util.go
vendored
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue