]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix a number of misuses of the word "an"
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 10 Dec 2019 14:27:53 +0000 (14:27 +0000)
committerRobert Griesemer <gri@golang.org>
Tue, 10 Dec 2019 16:23:10 +0000 (16:23 +0000)
After golang.org/cl/210124, I wondered if the same error had gone
unnoticed elsewhere. I quickly spotted another dozen mistakes after
reading through the output of:

git grep '\<[Aa]n [bcdfgjklmnpqrtvwyz][a-z]'

Many results are false positives for acronyms like "an mtime", since
it's pronounced "an em-time". However, the total amount of output isn't
that large given how simple the grep pattern is.

Change-Id: Iaa2ca69e42f4587a9e3137d6c5ed758887906ca6
Reviewed-on: https://go-review.googlesource.com/c/go/+/210678
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Zach Jones <zachj1@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

12 files changed:
doc/articles/go_command.html
src/archive/tar/reader.go
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/deadcode2.go
src/cmd/pprof/readlineui.go
src/crypto/elliptic/p256.go
src/encoding/gob/gobencdec_test.go
src/io/io_test.go
src/io/multi_test.go
src/reflect/type.go
src/runtime/alg.go
src/runtime/runtime1.go

index 9f4e8e063164c40dc15e2c0c6e975165dd4e02e5..5b6fd4d24b4a56e6f7e05d80671ff622a85eaaa7 100644 (file)
@@ -74,7 +74,7 @@ important, the use of the tool itself.</p>
 <p>The <code>go</code> command requires that code adheres to a few key,
 well-established conventions.</p>
 
-<p>First, the import path is derived in an known way from the URL of the
+<p>First, the import path is derived in a known way from the URL of the
 source code.  For Bitbucket, GitHub, Google Code, and Launchpad, the
 root directory of the repository is identified by the repository's
 main URL, without the <code>http://</code> prefix.  Subdirectories are named by
index 39437185179a66ce605a292b0c7197ae78575bac..4f9135b791943774cbda7d8527db9c1e547e7a32 100644 (file)
@@ -433,7 +433,7 @@ func (tr *Reader) readHeader() (*Header, *block, error) {
                        // files generated by a pre-Go1.8 toolchain. If the generated file
                        // happened to have a prefix field that parses as valid
                        // atime and ctime fields (e.g., when they are valid octal strings),
-                       // then it is impossible to distinguish between an valid GNU file
+                       // then it is impossible to distinguish between a valid GNU file
                        // and an invalid pre-Go1.8 file.
                        //
                        // See https://golang.org/issues/12594
index e79207e2b830ef6fe10ed7e8f9313686fea9a529..6d96ae50d7dc86fb72d776496a8c6b8000ea48d1 100644 (file)
@@ -306,7 +306,7 @@ func (d *deadcodepass) init() {
        }
 
        for _, name := range names {
-               // Mark symbol as an data/ABI0 symbol.
+               // Mark symbol as a data/ABI0 symbol.
                d.mark(d.ctxt.Syms.ROLookup(name, 0), nil)
                // Also mark any Go functions (internal ABI).
                d.mark(d.ctxt.Syms.ROLookup(name, sym.SymVerABIInternal), nil)
index cb6bb05492ec98127b26f8115030c31f07a9cac5..9197c700f586d41b96812ae83c4996be56b63d93 100644 (file)
@@ -113,7 +113,7 @@ func (d *deadcodePass2) init() {
        }
 
        for _, name := range names {
-               // Mark symbol as an data/ABI0 symbol.
+               // Mark symbol as a data/ABI0 symbol.
                d.mark(d.ldr.Lookup(name, 0), 0)
                // Also mark any Go functions (internal ABI).
                d.mark(d.ldr.Lookup(name, sym.SymVerABIInternal), 0)
index 5b9701a0e22f519593ce8426f520a9007fbe84fb..0c9fafdad75456aea5f0cc4a111b83be260253a2 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// This file contains an driver.UI implementation
+// This file contains a driver.UI implementation
 // that provides the readline functionality if possible.
 
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
index aa9eeb5061d90d1bd8865b63bb4acd75453dccb1..c23e414156f29316a88a6bad37d76ca0a3d42875 100644 (file)
@@ -307,7 +307,7 @@ func p256Diff(out, in, in2 *[p256Limbs]uint32) {
 }
 
 // p256ReduceDegree sets out = tmp/R mod p where tmp contains 64-bit words with
-// the same 29,28,... bit positions as an field element.
+// the same 29,28,... bit positions as a field element.
 //
 // The values in field elements are in Montgomery form: x*R mod p where R =
 // 2**257. Since we just multiplied two Montgomery values together, the result
index 41a06b26c876ee65d1dd07dcbe5221e3e8d53789..6d2c8db42d0d8925f7b77715715493e1ef44da05 100644 (file)
@@ -707,7 +707,7 @@ func TestGobEncoderExtraIndirect(t *testing.T) {
 
 // Another bug: this caused a crash with the new Go1 Time type.
 // We throw in a gob-encoding array, to test another case of isZero,
-// and a struct containing an nil interface, to test a third.
+// and a struct containing a nil interface, to test a third.
 type isZeroBug struct {
        T time.Time
        S string
index 0e4ce612400584d7bd9b1c32a47e77932a4d6cc1..ca90403c59c66b848bef83e7c8ff09ccf175e77e 100644 (file)
@@ -13,7 +13,7 @@ import (
        "testing"
 )
 
-// An version of bytes.Buffer without ReadFrom and WriteTo
+// A version of bytes.Buffer without ReadFrom and WriteTo
 type Buffer struct {
        bytes.Buffer
        ReaderFrom // conflicts with and hides bytes.Buffer's ReaderFrom.
index d34794a367a461e2590d45e8fb52022a186b2e6d..f05d5f74ef9a6d7a92796d505fabbebd0b97c203 100644 (file)
@@ -286,7 +286,7 @@ func TestMultiReaderSingleByteWithEOF(t *testing.T) {
        }
 }
 
-// Test that a reader returning (n, EOF) at the end of an MultiReader
+// Test that a reader returning (n, EOF) at the end of a MultiReader
 // chain continues to return EOF on its final read, rather than
 // yielding a (0, EOF).
 func TestMultiReaderFinalEOF(t *testing.T) {
index 3d6fde0ae3e9b7330fc9d393e9b5c35df5623081..fc31e31eee7314962a8ad820045716955f0fb203 100644 (file)
@@ -646,7 +646,7 @@ func resolveNameOff(ptrInModule unsafe.Pointer, off int32) unsafe.Pointer
 // Implemented in the runtime package.
 func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
 
-// resolveTextOff resolves an function pointer offset from a base type.
+// resolveTextOff resolves a function pointer offset from a base type.
 // The (*rtype).textOff method is a convenience wrapper for this function.
 // Implemented in the runtime package.
 func resolveTextOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
index 56a821298108f15fc190a9072affcf9f7aacf027..d8789b4b5f31bba9da25a87fc5ad78503ffb5849 100644 (file)
@@ -344,7 +344,7 @@ func initAlgAES() {
        getRandomData(aeskeysched[:])
 }
 
-// Note: These routines perform the read with an native endianness.
+// Note: These routines perform the read with a native endianness.
 func readUnaligned32(p unsafe.Pointer) uint32 {
        q := (*[4]byte)(p)
        if sys.BigEndian {
index 180dd7c7e49005dcbf2b5d77a7142a0467b6a550..148717f83d180e6ec915600d763c2adb694953ae 100644 (file)
@@ -486,7 +486,7 @@ func reflect_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
        return unsafe.Pointer((*_type)(rtype).typeOff(typeOff(off)))
 }
 
-// reflect_resolveTextOff resolves an function pointer offset from a base type.
+// reflect_resolveTextOff resolves a function pointer offset from a base type.
 //go:linkname reflect_resolveTextOff reflect.resolveTextOff
 func reflect_resolveTextOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
        return (*_type)(rtype).textOff(textOff(off))