[go] all: fix some minor grammatical issues in the comments

5 views
Skip to first unread message

shuang cui (Gerrit)

unread,
Dec 17, 2025, 9:38:01 PM (2 days ago) Dec 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

shuang cui has uploaded the change for review

Commit message

all: fix some minor grammatical issues in the comments
Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5

Change diff

diff --git a/src/archive/tar/reader_test.go b/src/archive/tar/reader_test.go
index de3d365..c7611ca 100644
--- a/src/archive/tar/reader_test.go
+++ b/src/archive/tar/reader_test.go
@@ -787,7 +787,7 @@

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 f999f56..891a1a3 100644
--- a/src/archive/tar/stat_unix.go
+++ b/src/archive/tar/stat_unix.go
@@ -19,7 +19,7 @@
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 217efe9..7d1af88 100644
--- a/src/archive/tar/strconv.go
+++ b/src/archive/tar/strconv.go
@@ -187,7 +187,7 @@
f.formatString(b, s)
}

-// fitsInOctal reports whether the integer x fits in a field n-bytes long
+// fitsInOctal reports whether the integer x fits in a field n-byte long
// using octal encoding with the appropriate NUL terminator.
func fitsInOctal(n int, x int64) bool {
octBits := uint(n-1) * 3
@@ -312,7 +312,7 @@
// "%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/debug/dwarf/entry_test.go b/src/debug/dwarf/entry_test.go
index ee0c80a..924e3a9 100644
--- a/src/debug/dwarf/entry_test.go
+++ b/src/debug/dwarf/entry_test.go
@@ -426,7 +426,7 @@
info := []byte{0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2d, 0x0, 0x5,
0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2d, 0x0}

- // The input above is malformed; the goal here it just to make sure
+ // The input above is malformed; the goal here is just to make sure
// that we don't get a panic or other bad behavior while trying to
// construct a dwarf.Data object from the input. For good measure,
// test to make sure we can handle the case where the input is
diff --git a/src/debug/gosym/pclntab_test.go b/src/debug/gosym/pclntab_test.go
index e380bb5..f128c39 100644
--- a/src/debug/gosym/pclntab_test.go
+++ b/src/debug/gosym/pclntab_test.go
@@ -114,7 +114,7 @@

tab := getTable(t)
if tab.go12line != nil {
- // aline's don't exist in the Go 1.2 table.
+ // alines don't exist in the Go 1.2 table.
t.Skip("not relevant to Go 1.2 symbol table")
}

@@ -163,7 +163,7 @@

tab := getTable(t)
if tab.go12line != nil {
- // aline's don't exist in the Go 1.2 table.
+ // alines don't exist in the Go 1.2 symbol table.
t.Skip("not relevant to Go 1.2 symbol table")
}

diff --git a/src/runtime/trace.go b/src/runtime/trace.go
index a7e8937..5f568d2 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 5adaede..1caf69f 100644
--- a/src/runtime/tracebuf.go
+++ b/src/runtime/tracebuf.go
@@ -29,7 +29,7 @@
*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 cd8ef7d..b322630 100644
--- a/test/typeparam/typelist.go
+++ b/test/typeparam/typelist.go
@@ -32,7 +32,7 @@
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
}

Change information

Files:
  • M src/archive/tar/reader_test.go
  • M src/archive/tar/stat_unix.go
  • M src/archive/tar/strconv.go
  • M src/debug/dwarf/entry_test.go
  • M src/debug/gosym/pclntab_test.go
  • M src/runtime/trace.go
  • M src/runtime/tracebuf.go
  • M test/typeparam/typelist.go
Change size: S
Delta: 8 files changed, 11 insertions(+), 11 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
Gerrit-Change-Number: 731000
Gerrit-PatchSet: 1
Gerrit-Owner: shuang cui <imc...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

shuang cui (Gerrit)

unread,
Dec 17, 2025, 9:40:35 PM (2 days ago) Dec 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

shuang cui uploaded new patchset

shuang cui uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
Gerrit-Change-Number: 731000
Gerrit-PatchSet: 2
Gerrit-Owner: shuang cui <imc...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

shuang cui (Gerrit)

unread,
Dec 17, 2025, 9:40:47 PM (2 days ago) Dec 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

shuang cui voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
Gerrit-Change-Number: 731000
Gerrit-PatchSet: 2
Gerrit-Owner: shuang cui <imc...@gmail.com>
Gerrit-Reviewer: shuang cui <imc...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Dec 2025 02:40:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Keith Randall (Gerrit)

unread,
Dec 18, 2025, 10:52:35 AM (yesterday) Dec 18
to shuang cui, goph...@pubsubhelper.golang.org, Go LUCI, Joseph Tsai, Keith Randall, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Joseph Tsai, Michael Knyszek and shuang cui

Keith Randall added 1 comment

File src/archive/tar/strconv.go
Line 190, Patchset 2 (Latest):// fitsInOctal reports whether the integer x fits in a field n-byte long
Keith Randall . unresolved

The original is correct here.

Open in Gerrit

Related details

Attention is currently required from:
  • Joseph Tsai
  • Michael Knyszek
  • shuang cui
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
    Gerrit-Change-Number: 731000
    Gerrit-PatchSet: 2
    Gerrit-Owner: shuang cui <imc...@gmail.com>
    Gerrit-Reviewer: Joseph Tsai <joe...@digital-static.net>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Reviewer: shuang cui <imc...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: shuang cui <imc...@gmail.com>
    Gerrit-Attention: Joseph Tsai <joe...@digital-static.net>
    Gerrit-Attention: Michael Knyszek <mkny...@google.com>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 15:52:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    shuang cui (Gerrit)

    unread,
    Dec 18, 2025, 9:09:32 PM (18 hours ago) Dec 18
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Joseph Tsai, Michael Knyszek and shuang cui

    shuang cui uploaded new patchset

    shuang cui uploaded patch set #3 to this change.
    Following approvals got outdated and were removed:
    • TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joseph Tsai
    • Michael Knyszek
    • shuang cui
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
      Gerrit-Change-Number: 731000
      Gerrit-PatchSet: 3
      unsatisfied_requirement
      open
      diffy

      shuang cui (Gerrit)

      unread,
      Dec 18, 2025, 9:09:43 PM (18 hours ago) Dec 18
      to goph...@pubsubhelper.golang.org, Go LUCI, Joseph Tsai, Keith Randall, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Joseph Tsai, Keith Randall and Michael Knyszek

      shuang cui voted and added 1 comment

      Votes added by shuang cui

      Commit-Queue+1

      1 comment

      File src/archive/tar/strconv.go
      Line 190, Patchset 2:// fitsInOctal reports whether the integer x fits in a field n-byte long
      Keith Randall . resolved

      The original is correct here.

      shuang cui

      Thanks for your review. Reverted.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joseph Tsai
      • Keith Randall
      • Michael Knyszek
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
        Gerrit-Change-Number: 731000
        Gerrit-PatchSet: 2
        Gerrit-Owner: shuang cui <imc...@gmail.com>
        Gerrit-Reviewer: Joseph Tsai <joe...@digital-static.net>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-Reviewer: shuang cui <imc...@gmail.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: Joseph Tsai <joe...@digital-static.net>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Comment-Date: Fri, 19 Dec 2025 02:09:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Keith Randall <k...@golang.org>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages