aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2025-12-18 10:36:50 +0800
committerGopher Robot <gobot@golang.org>2025-12-30 07:28:53 -0800
commitfd45d70799853ef5980a559e206353574108d8da (patch)
tree6809c57120f948fb54801d900e40b39c648a61ec
parentdf4e08ac65e94041367785783ec1482e8bed2397 (diff)
downloadgo-fd45d70799853ef5980a559e206353574108d8da.tar.xz
all: fix some minor grammatical issues in the comments
Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/731000 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org>
-rw-r--r--src/archive/tar/reader_test.go2
-rw-r--r--src/archive/tar/stat_unix.go2
-rw-r--r--src/archive/tar/strconv.go2
-rw-r--r--src/runtime/trace.go4
-rw-r--r--src/runtime/tracebuf.go2
-rw-r--r--test/typeparam/typelist.go2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/archive/tar/reader_test.go b/src/archive/tar/reader_test.go
index de3d365304..c7611ca044 100644
--- a/src/archive/tar/reader_test.go
+++ b/src/archive/tar/reader_test.go
@@ -787,7 +787,7 @@ type readBadSeeker struct{ io.ReadSeeker }
func (rbs *readBadSeeker) Seek(int64, int) (int64, error) { return 0, fmt.Errorf("illegal seek") }
-// TestReadTruncation test the ending condition on various truncated files and
+// TestReadTruncation tests the ending condition on various truncated files and
// that truncated files are still detected even if the underlying io.Reader
// satisfies io.Seeker.
func TestReadTruncation(t *testing.T) {
diff --git a/src/archive/tar/stat_unix.go b/src/archive/tar/stat_unix.go
index f999f56db6..891a1a3b4a 100644
--- a/src/archive/tar/stat_unix.go
+++ b/src/archive/tar/stat_unix.go
@@ -19,7 +19,7 @@ func init() {
sysStat = statUnix
}
-// userMap and groupMap caches UID and GID lookups for performance reasons.
+// userMap and groupMap cache UID and GID lookups for performance reasons.
// The downside is that renaming uname or gname by the OS never takes effect.
var userMap, groupMap sync.Map // map[int]string
diff --git a/src/archive/tar/strconv.go b/src/archive/tar/strconv.go
index 217efe9e2e..d3c28a8c4e 100644
--- a/src/archive/tar/strconv.go
+++ b/src/archive/tar/strconv.go
@@ -312,7 +312,7 @@ func formatPAXRecord(k, v string) (string, error) {
// "%d %s=%s\n" % (size, key, value)
//
// Keys and values should be UTF-8, but the number of bad writers out there
-// forces us to be a more liberal.
+// forces us to be more liberal.
// Thus, we only reject all keys with NUL, and only reject NULs in values
// for the PAX version of the USTAR string fields.
// The key must not contain an '=' character.
diff --git a/src/runtime/trace.go b/src/runtime/trace.go
index a7e8937a05..5f568d205e 100644
--- a/src/runtime/trace.go
+++ b/src/runtime/trace.go
@@ -12,7 +12,7 @@
//
// ## Design
//
-// The basic idea behind the the execution tracer is to have per-M buffers that
+// The basic idea behind the execution tracer is to have per-M buffers that
// trace data may be written into. Each M maintains a write flag indicating whether
// its trace buffer is currently in use.
//
@@ -173,7 +173,7 @@
// doesn't do this directly for performance reasons. The runtime implementation instead caches
// a G on the M created for the C thread. On Linux this M is then cached in the thread's TLS,
// and on other systems, the M is put on a global list on exit from Go. We need to do some
-// extra work to make sure that this is modeled correctly in the the tracer. For example,
+// extra work to make sure that this is modeled correctly in the tracer. For example,
// a C thread exiting Go may leave a P hanging off of its M (whether that M is kept in TLS
// or placed back on a list). In order to correctly model goroutine creation and destruction,
// we must behave as if the P was at some point stolen by the runtime, if the C thread
diff --git a/src/runtime/tracebuf.go b/src/runtime/tracebuf.go
index 5adaede424..1caf69f8b8 100644
--- a/src/runtime/tracebuf.go
+++ b/src/runtime/tracebuf.go
@@ -29,7 +29,7 @@ type traceWriter struct {
*traceBuf
}
-// writer returns an a traceWriter that writes into the current M's stream.
+// writer returns a traceWriter that writes into the current M's stream.
//
// Once this is called, the caller must guard against stack growth until
// end is called on it. Therefore, it's highly recommended to use this
diff --git a/test/typeparam/typelist.go b/test/typeparam/typelist.go
index cd8ef7d6e7..b3226301fb 100644
--- a/test/typeparam/typelist.go
+++ b/test/typeparam/typelist.go
@@ -32,7 +32,7 @@ func _[T interface{ ~int }](x T) {
var _ T = T(myint(42))
}
-// Indexing a generic type which has a an array as core type.
+// Indexing a generic type which has an array as core type.
func _[T interface{ ~[10]int }](x T) {
_ = x[9] // ok
}