Skip to content

Commit

Permalink
all: use the indefinite article an in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
callthingsoff committed Sep 22, 2023
1 parent 6d5c9f2 commit 4e8dcdb
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/archive/zip/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ func TestBaseOffsetPlusOverflow(t *testing.T) {
}
}()
// Previously, this would trigger a panic as we attempt to read from
// a io.SectionReader which would access a slice at a negative offset
// an io.SectionReader which would access a slice at a negative offset
// as the section reader offset & size were < 0.
NewReader(bytes.NewReader(data), int64(len(data))+1875)
}
2 changes: 1 addition & 1 deletion src/cmd/go/internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (c *DiskCache) putIndexEntry(id ActionID, out OutputID, size int64, allowVe
return nil
}

// noVerifyReadSeeker is a io.ReadSeeker wrapper sentinel type
// noVerifyReadSeeker is an io.ReadSeeker wrapper sentinel type
// that says that Cache.Put should skip the verify check
// (from GODEBUG=goverifycache=1).
type noVerifyReadSeeker struct {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/vcs/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ type metaImport struct {
Prefix, VCS, RepoRoot string
}

// A ImportMismatchError is returned where metaImport/s are present
// An ImportMismatchError is returned where metaImport/s are present
// but none match our import path.
type ImportMismatchError struct {
importPath string
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tls/ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type SessionState struct {
// To allow different layers in a protocol stack to share this field,
// applications must only append to it, not replace it, and must use entries
// that can be recognized even if out of order (for example, by starting
// with a id and version prefix).
// with an id and version prefix).
Extra [][]byte

// EarlyData indicates whether the ticket can be used for 0-RTT in a QUIC
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/x509/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ var verifyTests = []verifyTest{
},
},
{
// When there are two parents, one with a incorrect subject but matching SKID
// When there are two parents, one with an incorrect subject but matching SKID
// and one with a correct subject but missing SKID, the latter should be
// considered as a possible parent.
leaf: leafMatchingAKIDMatchingIssuer,
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/x509/x509_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3652,7 +3652,7 @@ func TestDisableSHA1ForCertOnly(t *testing.T) {
}

// This is an unrelated OCSP response, which will fail signature verification
// but shouldn't return a InsecureAlgorithmError, since SHA1 should be allowed
// but shouldn't return an InsecureAlgorithmError, since SHA1 should be allowed
// for OCSP.
ocspTBSHex := "30819fa2160414884451ff502a695e2d88f421bad90cf2cecbea7c180f32303133303631383037323434335a30743072304a300906052b0e03021a0500041448b60d38238df8456e4ee5843ea394111802979f0414884451ff502a695e2d88f421bad90cf2cecbea7c021100f78b13b946fc9635d8ab49de9d2148218000180f32303133303631383037323434335aa011180f32303133303632323037323434335a"
ocspTBS, err := hex.DecodeString(ocspTBSHex)
Expand Down
2 changes: 1 addition & 1 deletion src/database/sql/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func conversionTests() []conversionTest {
{s: "256", d: &scanuint8, wanterr: "converting driver.Value type string (\"256\") to a uint8: value out of range"},
{s: "256", d: &scanuint16, wantuint: 256},
{s: "-1", d: &scanint, wantint: -1},
{s: "foo", d: &scanint, wanterr: "converting driver.Value type string (\"foo\") to a int: invalid syntax"},
{s: "foo", d: &scanint, wanterr: "converting driver.Value type string (\"foo\") to an int: invalid syntax"},

// int64 to smaller integers
{s: int64(5), d: &scanuint8, wantuint: 5},
Expand Down
2 changes: 1 addition & 1 deletion src/image/gif/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
trailerStr = "\x3b"
)

// lzw.NewReader wants a io.ByteReader, this ensures we're compatible.
// lzw.NewReader wants an io.ByteReader, this ensures we're compatible.
var _ io.ByteReader = (*blockReader)(nil)

// lzwEncode returns an LZW encoding (with 2-bit literals) of in.
Expand Down
4 changes: 2 additions & 2 deletions src/os/os_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@ 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.
// Stat'ing an 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.
_, err = os.Stat(link)
const ERROR_CANT_ACCESS_FILE = syscall.Errno(1920)
Expand Down
2 changes: 1 addition & 1 deletion src/os/signal/signal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func init() {
// Older linux kernels seem to have some hiccups delivering the signal
// in a timely manner on ppc64 and ppc64le. When running on a
// ppc64le/ubuntu 16.04/linux 4.4 host the time can vary quite
// substantially even on a idle system. 5 seconds is twice any value
// substantially even on an idle system. 5 seconds is twice any value
// observed when running 10000 tests on such a system.
settleTime = 5 * time.Second
} else if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
Expand Down
2 changes: 1 addition & 1 deletion test/typeparam/boundmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// license that can be found in the LICENSE file.

// This test illustrates how a type bound method (String below) can be implemented
// either by a concrete type (myint below) or a instantiated generic type
// either by a concrete type (myint below) or an instantiated generic type
// (StringInt[myint] below).

package main
Expand Down

0 comments on commit 4e8dcdb

Please sign in to comment.