aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2019-12-10 14:27:53 +0000
committerRobert Griesemer <gri@golang.org>2019-12-10 16:23:10 +0000
commit41348081fa0511c8f442d236d32ff8d589c8c557 (patch)
tree89b75e7cbc221e7a6cfa21943fe57bfecd870d05 /src
parent3a3093d5c7e1fb557d7b598a758f4925db4b0f13 (diff)
downloadgo-41348081fa0511c8f442d236d32ff8d589c8c557.tar.xz
all: fix a number of misuses of the word "an"
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>
Diffstat (limited to 'src')
-rw-r--r--src/archive/tar/reader.go2
-rw-r--r--src/cmd/link/internal/ld/deadcode.go2
-rw-r--r--src/cmd/link/internal/ld/deadcode2.go2
-rw-r--r--src/cmd/pprof/readlineui.go2
-rw-r--r--src/crypto/elliptic/p256.go2
-rw-r--r--src/encoding/gob/gobencdec_test.go2
-rw-r--r--src/io/io_test.go2
-rw-r--r--src/io/multi_test.go2
-rw-r--r--src/reflect/type.go2
-rw-r--r--src/runtime/alg.go2
-rw-r--r--src/runtime/runtime1.go2
11 files changed, 11 insertions, 11 deletions
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go
index 3943718517..4f9135b791 100644
--- a/src/archive/tar/reader.go
+++ b/src/archive/tar/reader.go
@@ -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
diff --git a/src/cmd/link/internal/ld/deadcode.go b/src/cmd/link/internal/ld/deadcode.go
index e79207e2b8..6d96ae50d7 100644
--- a/src/cmd/link/internal/ld/deadcode.go
+++ b/src/cmd/link/internal/ld/deadcode.go
@@ -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)
diff --git a/src/cmd/link/internal/ld/deadcode2.go b/src/cmd/link/internal/ld/deadcode2.go
index cb6bb05492..9197c700f5 100644
--- a/src/cmd/link/internal/ld/deadcode2.go
+++ b/src/cmd/link/internal/ld/deadcode2.go
@@ -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)
diff --git a/src/cmd/pprof/readlineui.go b/src/cmd/pprof/readlineui.go
index 5b9701a0e2..0c9fafdad7 100644
--- a/src/cmd/pprof/readlineui.go
+++ b/src/cmd/pprof/readlineui.go
@@ -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
diff --git a/src/crypto/elliptic/p256.go b/src/crypto/elliptic/p256.go
index aa9eeb5061..c23e414156 100644
--- a/src/crypto/elliptic/p256.go
+++ b/src/crypto/elliptic/p256.go
@@ -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
diff --git a/src/encoding/gob/gobencdec_test.go b/src/encoding/gob/gobencdec_test.go
index 41a06b26c8..6d2c8db42d 100644
--- a/src/encoding/gob/gobencdec_test.go
+++ b/src/encoding/gob/gobencdec_test.go
@@ -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
diff --git a/src/io/io_test.go b/src/io/io_test.go
index 0e4ce61240..ca90403c59 100644
--- a/src/io/io_test.go
+++ b/src/io/io_test.go
@@ -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.
diff --git a/src/io/multi_test.go b/src/io/multi_test.go
index d34794a367..f05d5f74ef 100644
--- a/src/io/multi_test.go
+++ b/src/io/multi_test.go
@@ -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) {
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 3d6fde0ae3..fc31e31eee 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -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
diff --git a/src/runtime/alg.go b/src/runtime/alg.go
index 56a8212981..d8789b4b5f 100644
--- a/src/runtime/alg.go
+++ b/src/runtime/alg.go
@@ -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 {
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index 180dd7c7e4..148717f83d 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -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))