diff options
| author | cui fliter <imcusg@gmail.com> | 2023-03-31 00:00:19 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-04-04 14:20:53 +0000 |
| commit | d8d22664c65b0054fc9ea6ba7e945481348fc8fc (patch) | |
| tree | 4064f3dcc84f382816d6cb50437c6267a1c63f57 /src/cmd | |
| parent | f62c9701b4bc61da6a5f4db8ef81d816f112430e (diff) | |
| download | go-d8d22664c65b0054fc9ea6ba7e945481348fc8fc.tar.xz | |
all: fix misuses of "a" vs "an"
Fixes the misuse of "a" vs "an", according to English grammatical
expectations and using https://www.a-or-an.com/
Change-Id: I53ac724070e3ff3d33c304483fe72c023c7cda47
Reviewed-on: https://go-review.googlesource.com/c/go/+/480536
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/compile/internal/abt/avlint32.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ir/expr.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ir/val.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/loopbce.go | 6 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/op.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/poset.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/types/type.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/walk/assign.go | 4 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/asm9.go | 2 | ||||
| -rw-r--r-- | src/cmd/internal/obj/riscv/obj.go | 2 | ||||
| -rw-r--r-- | src/cmd/internal/obj/wasm/wasmobj.go | 2 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/data.go | 2 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/xcoff.go | 6 | ||||
| -rw-r--r-- | src/cmd/link/internal/loadpe/ldpe.go | 2 | ||||
| -rw-r--r-- | src/cmd/link/internal/ppc64/asm.go | 2 |
15 files changed, 20 insertions, 20 deletions
diff --git a/src/cmd/compile/internal/abt/avlint32.go b/src/cmd/compile/internal/abt/avlint32.go index 9800e03ac0..28c1642c6e 100644 --- a/src/cmd/compile/internal/abt/avlint32.go +++ b/src/cmd/compile/internal/abt/avlint32.go @@ -570,7 +570,7 @@ func (t *node32) lub(key int32, allow_eq bool) *node32 { // t is too small, lub is to right. t = t.right } else { - // t is a upper bound, record it and seek a better one. + // t is an upper bound, record it and seek a better one. best = t t = t.left } diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go index 5d82788008..39ebc37634 100644 --- a/src/cmd/compile/internal/ir/expr.go +++ b/src/cmd/compile/internal/ir/expr.go @@ -380,7 +380,7 @@ func (n *InlinedCallExpr) SingleResult() Node { return n.ReturnVars[0] } -// A LogicalExpr is a expression X Op Y where Op is && or ||. +// A LogicalExpr is an expression X Op Y where Op is && or ||. // It is separate from BinaryExpr to make room for statements // that must be executed before Y but after X. type LogicalExpr struct { diff --git a/src/cmd/compile/internal/ir/val.go b/src/cmd/compile/internal/ir/val.go index b62174b141..75da5a1462 100644 --- a/src/cmd/compile/internal/ir/val.go +++ b/src/cmd/compile/internal/ir/val.go @@ -92,7 +92,7 @@ func Int64Val(n Node) int64 { return x } -// Uint64Val returns n as an uint64. +// Uint64Val returns n as a uint64. // n must be an integer or rune constant. func Uint64Val(n Node) uint64 { if !IsConst(n, constant.Int) { diff --git a/src/cmd/compile/internal/ssa/loopbce.go b/src/cmd/compile/internal/ssa/loopbce.go index 273ead4942..b7dfaa33e3 100644 --- a/src/cmd/compile/internal/ssa/loopbce.go +++ b/src/cmd/compile/internal/ssa/loopbce.go @@ -93,7 +93,7 @@ func findIndVar(f *Func) []indVar { var init *Value // starting value var limit *Value // ending value - // Check thet the control if it either ind </<= limit or limit </<= ind. + // Check that the control if it either ind </<= limit or limit </<= ind. // TODO: Handle unsigned comparisons? c := b.Controls[0] inclusive := false @@ -117,12 +117,12 @@ func findIndVar(f *Func) []indVar { // for i := len(n)-1; i >= 0; i-- init, inc, nxt = parseIndVar(limit) if init == nil { - // No recognied induction variable on either operand + // No recognized induction variable on either operand continue } // Ok, the arguments were reversed. Swap them, and remember that we're - // looking at a ind >/>= loop (so the induction must be decrementing). + // looking at an ind >/>= loop (so the induction must be decrementing). ind, limit = limit, ind less = false } diff --git a/src/cmd/compile/internal/ssa/op.go b/src/cmd/compile/internal/ssa/op.go index 9434c0ef16..e2319d78d6 100644 --- a/src/cmd/compile/internal/ssa/op.go +++ b/src/cmd/compile/internal/ssa/op.go @@ -372,7 +372,7 @@ const ( auxARM64BitField // aux is an arm64 bitfield lsb and width packed into auxInt auxS390XRotateParams // aux is a s390x rotate parameters object encoding start bit, end bit and rotate amount auxS390XCCMask // aux is a s390x 4-bit condition code mask - auxS390XCCMaskInt8 // aux is a s390x 4-bit condition code mask, auxInt is a int8 immediate + auxS390XCCMaskInt8 // aux is a s390x 4-bit condition code mask, auxInt is an int8 immediate auxS390XCCMaskUint8 // aux is a s390x 4-bit condition code mask, auxInt is a uint8 immediate ) diff --git a/src/cmd/compile/internal/ssa/poset.go b/src/cmd/compile/internal/ssa/poset.go index ad89de3f13..19d9f9004d 100644 --- a/src/cmd/compile/internal/ssa/poset.go +++ b/src/cmd/compile/internal/ssa/poset.go @@ -56,7 +56,7 @@ const ( ) // posetUndo represents an undo pass to be performed. -// It's an union of fields that can be used to store information, +// It's a union of fields that can be used to store information, // and typ is the discriminant, that specifies which kind // of operation must be performed. Not all fields are always used. type posetUndo struct { diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index 513ce51b2c..9775d37b39 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -1345,7 +1345,7 @@ func (t *Type) IsUnsafePtr() bool { return t.kind == TUNSAFEPTR } -// IsUintptr reports whether t is an uintptr. +// IsUintptr reports whether t is a uintptr. func (t *Type) IsUintptr() bool { return t.kind == TUINTPTR } diff --git a/src/cmd/compile/internal/walk/assign.go b/src/cmd/compile/internal/walk/assign.go index 8f27329da8..4207b487a7 100644 --- a/src/cmd/compile/internal/walk/assign.go +++ b/src/cmd/compile/internal/walk/assign.go @@ -609,7 +609,7 @@ func isAppendOfMake(n ir.Node) bool { } // y must be either an integer constant or the largest possible positive value - // of variable y needs to fit into an uint. + // of variable y needs to fit into a uint. // typecheck made sure that constant arguments to make are not negative and fit into an int. @@ -652,7 +652,7 @@ func isAppendOfMake(n ir.Node) bool { // growslice will have done the clearing for us. func extendSlice(n *ir.CallExpr, init *ir.Nodes) ir.Node { - // isAppendOfMake made sure all possible positive values of l2 fit into an uint. + // isAppendOfMake made sure all possible positive values of l2 fit into a uint. // The case of l2 overflow when converting from e.g. uint to int is handled by an explicit // check of l2 < 0 at runtime which is generated below. l2 := typecheck.Conv(n.Args[1].(*ir.MakeExpr).Len, types.Types[types.TINT]) diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index 9516ea3cd6..1091127210 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -626,7 +626,7 @@ func addpad(pc, a int64, ctxt *obj.Link, cursym *obj.LSym) int { return 0 } -// Get the implied register of a operand which doesn't specify one. These show up +// Get the implied register of an operand which doesn't specify one. These show up // in handwritten asm like "MOVD R5, foosymbol" where a base register is not supplied, // or "MOVD R5, foo+10(SP) or pseudo-register is used. The other common case is when // generating constants in register like "MOVD $constant, Rx". diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go index 8aa76a670d..0d97121e2c 100644 --- a/src/cmd/internal/obj/riscv/obj.go +++ b/src/cmd/internal/obj/riscv/obj.go @@ -1691,7 +1691,7 @@ func instructionForProg(p *obj.Prog) *instruction { return ins } -// instructionsForOpImmediate returns the machine instructions for a immedate +// instructionsForOpImmediate returns the machine instructions for an immediate // operand. The instruction is specified by as and the source register is // specified by rs, instead of the obj.Prog. func instructionsForOpImmediate(p *obj.Prog, as obj.As, rs int16) []*instruction { diff --git a/src/cmd/internal/obj/wasm/wasmobj.go b/src/cmd/internal/obj/wasm/wasmobj.go index fd0faec84b..f344b53870 100644 --- a/src/cmd/internal/obj/wasm/wasmobj.go +++ b/src/cmd/internal/obj/wasm/wasmobj.go @@ -232,7 +232,7 @@ func preprocess(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) { // Offset is the location of the param on the Go stack (ie relative to sp). // Because of our call convention, the parameters are located an additional 8 bytes - // from sp because we store the return address as a int64 at the bottom of the stack. + // from sp because we store the return address as an int64 at the bottom of the stack. // Ie the stack looks like [return_addr, param3, param2, param1, etc] // Ergo, we add 8 to the true byte offset of the param to skip the return address. diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go index 66e97c69db..49766d598d 100644 --- a/src/cmd/link/internal/ld/data.go +++ b/src/cmd/link/internal/ld/data.go @@ -1677,7 +1677,7 @@ func (ctxt *Link) dodata(symGroupType []sym.SymKind) { } } -// allocateDataSectionForSym creates a new sym.Section into which a a +// allocateDataSectionForSym creates a new sym.Section into which a // single symbol will be placed. Here "seg" is the segment into which // the section will go, "s" is the symbol to be placed into the new // section, and "rwx" contains permissions for the section. diff --git a/src/cmd/link/internal/ld/xcoff.go b/src/cmd/link/internal/ld/xcoff.go index 7b8a134221..158a86f61d 100644 --- a/src/cmd/link/internal/ld/xcoff.go +++ b/src/cmd/link/internal/ld/xcoff.go @@ -38,7 +38,7 @@ const ( // XCOFF binaries should normally have all its sections position-independent. // However, this is not yet possible for .text because of some R_ADDR relocations // inside RODATA symbols. - // .data and .bss are position-independent so their address start inside a unreachable + // .data and .bss are position-independent so their address start inside an unreachable // segment during execution to force segfault if something is wrong. XCOFFTEXTBASE = 0x100000000 // Start of text address XCOFFDATABASE = 0x200000000 // Start of data address @@ -875,7 +875,7 @@ func (f *xcoffFile) writeSymbolFunc(ctxt *Link, x loader.Sym) []xcoffSym { // put function used by genasmsym to write symbol table. func putaixsym(ctxt *Link, x loader.Sym, t SymbolType) { // All XCOFF symbols generated by this GO symbols - // Can be a symbol entry or a auxiliary entry + // Can be a symbol entry or an auxiliary entry syms := []xcoffSym{} ldr := ctxt.loader @@ -1329,7 +1329,7 @@ func (ctxt *Link) doxcoff() { } if ldr.SymType(s) == sym.STEXT { - // On AIX, a exported function must have two symbols: + // On AIX, an exported function must have two symbols: // - a .text symbol which must start with a ".". // - a .data symbol which is a function descriptor. name := ldr.SymExtname(s) diff --git a/src/cmd/link/internal/loadpe/ldpe.go b/src/cmd/link/internal/loadpe/ldpe.go index 00af640b74..0a610ff048 100644 --- a/src/cmd/link/internal/loadpe/ldpe.go +++ b/src/cmd/link/internal/loadpe/ldpe.go @@ -141,7 +141,7 @@ const ( // a jump to the loaded value. CreateImportStubPltToken = -2 - // When stored into the GOT value for a import symbol __imp_X this + // When stored into the GOT value for an import symbol __imp_X this // token tells windynrelocsym to redirect references to the // underlying DYNIMPORT symbol X. RedirectToDynImportGotToken = -2 diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go index 63869704e5..9141d05ffb 100644 --- a/src/cmd/link/internal/ppc64/asm.go +++ b/src/cmd/link/internal/ppc64/asm.go @@ -704,7 +704,7 @@ func xcoffreloc1(arch *sys.Arch, out *ld.OutBuf, ldr *loader.Loader, s loader.Sy } func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s loader.Sym, r loader.ExtReloc, ri int, sectoff int64) bool { - // Beware that bit0~bit15 start from the third byte of a instruction in Big-Endian machines. + // Beware that bit0~bit15 start from the third byte of an instruction in Big-Endian machines. rt := r.Type if rt == objabi.R_ADDR || rt == objabi.R_POWER_TLS || rt == objabi.R_CALLPOWER { } else { |
