]> Cypherpunks repositories - gostls13.git/commitdiff
src: a/an grammar fixes
authorVille Skyttä <ville.skytta@iki.fi>
Sat, 18 Nov 2023 11:58:34 +0000 (11:58 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 20 Nov 2023 15:56:08 +0000 (15:56 +0000)
Change-Id: I179b50ae8e73677d4d408b83424afbbfe6aa17a1
GitHub-Last-Rev: 2e2d9c1e45556155d02db4df381b99f2d1bc5c0e
GitHub-Pull-Request: golang/go#63478
Reviewed-on: https://go-review.googlesource.com/c/go/+/534015
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
20 files changed:
src/cmd/compile/internal/devirtualize/devirtualize.go
src/cmd/compile/internal/escape/graph.go
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ssa/magic.go
src/cmd/compile/internal/types2/builtins.go
src/cmd/compile/internal/walk/closure.go
src/cmd/internal/obj/loong64/obj.go
src/cmd/link/internal/loader/loader.go
src/go/types/builtins.go
src/net/conf.go
src/net/fd_fake.go
src/net/http/transport.go
src/os/os_windows_test.go
src/reflect/all_test.go
src/runtime/iface.go
src/runtime/metrics_test.go
src/runtime/mgcpacer.go
src/runtime/race.go
src/strings/strings.go
src/sync/map_test.go

index b5e55c6d48b672ee8b6f880dfc291bce3de7102d..9e26f66a1c30cc8078d364fbee0b54b34468c6ca 100644 (file)
@@ -70,7 +70,7 @@ func staticCall(call *ir.CallExpr) {
                return
        }
 
-       // If typ *has* a shape type, then it's an shaped, instantiated
+       // If typ *has* a shape type, then it's a shaped, instantiated
        // type like T[go.shape.int], and its methods (may) have an extra
        // dictionary parameter. We could devirtualize this call if we
        // could derive an appropriate dictionary argument.
index f3baa67223d21357abd3a86e2dffd5354d38b6f2..75e2546a7b7a0604195e69e06cf057fe2c908b52 100644 (file)
@@ -38,7 +38,7 @@ import (
 //        e.value(k, n.Left)
 //    }
 
-// An location represents an abstract location that stores a Go
+// A location represents an abstract location that stores a Go
 // variable.
 type location struct {
        n         ir.Node  // represented variable or expression, if any
index 1bf9a15ae01897c8a26254761112f2907e2c2ba7..1bcd6482822131d91f16a1dde4c55a07f4366d7c 100644 (file)
@@ -350,7 +350,7 @@ func NewKeyExpr(pos src.XPos, key, value Node) *KeyExpr {
        return n
 }
 
-// A StructKeyExpr is an Field: Value composite literal key.
+// A StructKeyExpr is a Field: Value composite literal key.
 type StructKeyExpr struct {
        miniExpr
        Field *types.Field
index df4b56813438ec869ca7f083c39f12794a2b6bd0..235b0e5e5c6aa302a8b7da225c17f8c827c6bd38 100644 (file)
@@ -170,7 +170,7 @@ func smagicOK(n uint, c int64) bool {
        return c&(c-1) != 0
 }
 
-// smagicOKn reports whether we should strength reduce an signed n-bit divide by c.
+// smagicOKn reports whether we should strength reduce a signed n-bit divide by c.
 func smagicOK8(c int8) bool   { return smagicOK(8, int64(c)) }
 func smagicOK16(c int16) bool { return smagicOK(16, int64(c)) }
 func smagicOK32(c int32) bool { return smagicOK(32, int64(c)) }
index 01b8e46304cfcac949c5aa138c437c09e54b0214..575a1daed208eabbff24fa06a50bf78c1f4e3021 100644 (file)
@@ -954,7 +954,7 @@ func hasVarSize(t Type, seen map[*Named]bool) (varSized bool) {
 }
 
 // applyTypeFunc applies f to x. If x is a type parameter,
-// the result is a type parameter constrained by an new
+// the result is a type parameter constrained by a new
 // interface bound. The type bounds for that interface
 // are computed by applying f to each of the type bounds
 // of x. If any of these applications of f return nil,
index 6fc2317afb13333b8ee78cf02dbb2b528bd6a222..38c6c03dc496faba9741b1ad3e7b6279d94cb04b 100644 (file)
@@ -144,7 +144,7 @@ func walkClosure(clo *ir.ClosureExpr, init *ir.Nodes) ir.Node {
        return walkExpr(cfn, init)
 }
 
-// closureArgs returns a slice of expressions that an be used to
+// closureArgs returns a slice of expressions that can be used to
 // initialize the given closure's free variables. These correspond
 // one-to-one with the variables in clo.Func.ClosureVars, and will be
 // either an ONAME node (if the variable is captured by value) or an
index 1eedd46c6998e67a2a11624901da3f5696c46c1f..d15d0dfd4c4c5cad5d6ab21286d23f6b3df9402e 100644 (file)
@@ -290,7 +290,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
                                //      NOP
                                //
                                // The NOP is needed to give the jumps somewhere to land.
-                               // It is a liblink NOP, not an hardware NOP: it encodes to 0 instruction bytes.
+                               // It is a liblink NOP, not a hardware NOP: it encodes to 0 instruction bytes.
                                //
                                // We don't generate this for leafs because that means the wrapped
                                // function was inlined into the wrapper.
index 5dd657b4d7fc7131a9c8bc8e0108f8654bd94d0b..3edb5e2f6f16474d8f7db96dbcf40bc6088eb996 100644 (file)
@@ -988,7 +988,7 @@ func (l *Loader) AttrExternal(i Sym) bool {
        return l.attrExternal.Has(l.extIndex(i))
 }
 
-// SetAttrExternal sets the "external" property for an host object
+// SetAttrExternal sets the "external" property for a host object
 // symbol (see AttrExternal).
 func (l *Loader) SetAttrExternal(i Sym, v bool) {
        if !l.IsExternal(i) {
index 72b4c5370d2e004e075e6f9698f961449cb01e8b..3a3cee1726369654039077cdb9a6129a2d61ddad 100644 (file)
@@ -953,7 +953,7 @@ func hasVarSize(t Type, seen map[*Named]bool) (varSized bool) {
 }
 
 // applyTypeFunc applies f to x. If x is a type parameter,
-// the result is a type parameter constrained by an new
+// the result is a type parameter constrained by a new
 // interface bound. The type bounds for that interface
 // are computed by applying f to each of the type bounds
 // of x. If any of these applications of f return nil,
index 649ebcfb18ad6f18354d8f65b2892d09a2226f4f..15d73cf6ce1a45aadb2b24594d4711b9a145408c 100644 (file)
@@ -522,7 +522,7 @@ func isGateway(h string) bool {
        return stringsEqualFold(h, "_gateway")
 }
 
-// isOutbound reports whether h should be considered a "outbound"
+// isOutbound reports whether h should be considered an "outbound"
 // name for the myhostname NSS module.
 func isOutbound(h string) bool {
        return stringsEqualFold(h, "_outbound")
index b9361a3c4e3f4df55c45c55b36153a0daf67a7d6..ae567acc6994e65a42f99a4199acfbe38c50e0e9 100644 (file)
@@ -30,7 +30,7 @@ type netFD struct {
        raddr       Addr
 
        // The only networking available in WASI preview 1 is the ability to
-       // sock_accept on an pre-opened socket, and then fd_read, fd_write,
+       // sock_accept on a pre-opened socket, and then fd_read, fd_write,
        // fd_close, and sock_shutdown on the resulting connection. We
        // intercept applicable netFD calls on this instance, and then pass
        // the remainder of the netFD calls to fakeNetFD.
index 1cf41a54740de4641a74c672fa487f914156afef..170ba86cc42f504229855c8a2532b06b07c0f0c9 100644 (file)
@@ -237,7 +237,7 @@ type Transport struct {
 
        // TLSNextProto specifies how the Transport switches to an
        // alternate protocol (such as HTTP/2) after a TLS ALPN
-       // protocol negotiation. If Transport dials an TLS connection
+       // protocol negotiation. If Transport dials a TLS connection
        // with a non-empty protocol name and TLSNextProto contains a
        // map entry for that key (such as "h2"), then the func is
        // called with the request's authority (such as "example.com"
index f8edaeb87606b2507681de13f7bdac6a6c503a34..7436b9a969a9bc5431aab66b73d317f9506ec432 100644 (file)
@@ -581,7 +581,7 @@ func TestStatLxSymLink(t *testing.T) {
        }
        if m := fi.Mode(); m&fs.ModeSymlink != 0 {
                // This can happen depending on newer WSL versions when running as admin or in developer mode.
-               t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of a IO_REPARSE_TAG_LX_SYMLINK")
+               t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of an IO_REPARSE_TAG_LX_SYMLINK")
        }
        // Stat'ing a IO_REPARSE_TAG_LX_SYMLINK from outside WSL always return ERROR_CANT_ACCESS_FILE.
        // We check this condition to validate that os.Stat has tried to follow the link.
index a28f2a4bed14fe07a1e0d2926eae14b1364e77f3..e77537c9a513a5c6413d7e5d956f0aaf778e8c57 100644 (file)
@@ -4755,7 +4755,7 @@ func TestConvertSlice2Array(t *testing.T) {
        // Converting a slice to non-empty array needs to return
        // a non-addressable copy of the original memory.
        if v.CanAddr() {
-               t.Fatalf("convert slice to non-empty array returns a addressable copy array")
+               t.Fatalf("convert slice to non-empty array returns an addressable copy array")
        }
        for i := range s {
                ov.Index(i).Set(ValueOf(i + 1))
index 4563809a9dde76e225d1e14622ca9072fd4d5eec..b8c7caeebcea80ceec0cfa068e7f2154b73bc160 100644 (file)
@@ -567,7 +567,7 @@ func interfaceSwitch(s *abi.InterfaceSwitch, t *_type) (int, *itab) {
        return case_, tab
 }
 
-// buildInterfaceSwitchCache constructs a interface switch cache
+// buildInterfaceSwitchCache constructs an interface switch cache
 // containing all the entries from oldC plus the new entry
 // (typ,case_,tab).
 func buildInterfaceSwitchCache(oldC *abi.InterfaceSwitchCache, typ *_type, case_ int, tab *itab) *abi.InterfaceSwitchCache {
index 1e82897381c43c86f72675ccdaa1682ae495dee9..acaa5ca375f114f4f8eed4be5c0f3d2aea62299a 100644 (file)
@@ -40,7 +40,7 @@ func TestReadMetrics(t *testing.T) {
        oldLimit := debug.SetMemoryLimit(limit)
        defer debug.SetMemoryLimit(oldLimit)
 
-       // Set an GC percent to check the metric for it
+       // Set a GC percent to check the metric for it
        gcPercent := 99
        oldGCPercent := debug.SetGCPercent(gcPercent)
        defer debug.SetGCPercent(oldGCPercent)
index 716e3efcccebba33414183211a6784a3bb2c5ef9..3d07cc70e80b5e7236f0d1208a5f836c547b4979 100644 (file)
@@ -1377,7 +1377,7 @@ func (c *gcControllerState) needIdleMarkWorker() bool {
        return n < max
 }
 
-// removeIdleMarkWorker must be called when an new idle mark worker stops executing.
+// removeIdleMarkWorker must be called when a new idle mark worker stops executing.
 func (c *gcControllerState) removeIdleMarkWorker() {
        for {
                old := c.idleMarkWorkers.Load()
index f9cbc1f54b396d10e96d3eed05f9a0b98be28733..ca4f0519799022b1133f298d64118b0d262efff8 100644 (file)
@@ -179,7 +179,7 @@ func raceSymbolizeCode(ctx *symbolizeCodeContext) {
                                // Ignore wrappers, unless we're at the outermost frame of u.
                                // A non-inlined wrapper frame always means we have a physical
                                // frame consisting entirely of wrappers, in which case we'll
-                               // take a outermost wrapper over nothing.
+                               // take an outermost wrapper over nothing.
                                continue
                        }
 
index ce79bccf8c00f38bfd14435714093795b2fe5b7d..f3f0723721f63e89c5963b30de91c8dbac6f17ec 100644 (file)
@@ -521,7 +521,7 @@ func Map(mapping func(rune) rune, s string) string {
                        if r < utf8.RuneSelf {
                                b.WriteByte(byte(r))
                        } else {
-                               // r is not a ASCII rune.
+                               // r is not an ASCII rune.
                                b.WriteRune(r)
                        }
                }
index 20872f3b72ba447c142900ccf6d8709929d34d10..316f87bacc31589ee0d3d6cc9c52506e19115bf6 100644 (file)
@@ -278,7 +278,7 @@ func TestCompareAndSwap_NonExistingKey(t *testing.T) {
        m := &sync.Map{}
        if m.CompareAndSwap(m, nil, 42) {
                // See https://go.dev/issue/51972#issuecomment-1126408637.
-               t.Fatalf("CompareAndSwap on an non-existing key succeeded")
+               t.Fatalf("CompareAndSwap on a non-existing key succeeded")
        }
 }