aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2026-03-28 16:50:11 +0800
committerGopher Robot <gobot@golang.org>2026-03-30 10:18:42 -0700
commita4b534f5e42fe58d58c0ff0562d76680cedb0466 (patch)
treefaa4fede346187d8aa85191407895f05d4cbb3dd /src
parent9c88851d456b462ae3aa5fe8b9d66ea953af48f6 (diff)
downloadgo-a4b534f5e42fe58d58c0ff0562d76680cedb0466.tar.xz
all: fix some minor issues in the comments
Change-Id: If6c304efac7a46a9718cdc63ded3d98a26a3a831 Reviewed-on: https://go-review.googlesource.com/c/go/+/760700 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Neal Patel <nealpatel@google.com> Reviewed-by: Fred Sauer <fredsa@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/ir/dump.go2
-rw-r--r--src/cmd/compile/internal/ir/fmt.go2
-rw-r--r--src/encoding/json/v2/errors.go2
-rw-r--r--src/internal/fuzz/encoding_test.go2
-rw-r--r--src/os/root_windows.go2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/ir/dump.go b/src/cmd/compile/internal/ir/dump.go
index 13599d7c50..528fade408 100644
--- a/src/cmd/compile/internal/ir/dump.go
+++ b/src/cmd/compile/internal/ir/dump.go
@@ -213,7 +213,7 @@ func DumpNodeHTML(fn *Func, why string, n Node) {
w.WritePhase(why, why)
}
-// CloseHTMLWriter closes the HTML writer for fn, if one exists.
+// CloseHTMLWriters closes the HTML writer for fn, if one exists.
func CloseHTMLWriters() {
mu.Lock()
defer mu.Unlock()
diff --git a/src/cmd/compile/internal/ir/fmt.go b/src/cmd/compile/internal/ir/fmt.go
index 8b7ddf0688..00bc1af0ff 100644
--- a/src/cmd/compile/internal/ir/fmt.go
+++ b/src/cmd/compile/internal/ir/fmt.go
@@ -902,7 +902,7 @@ func Dump(s string, n Node) {
fmt.Printf("%s%+v\n", s, n)
}
-// Fdump prints to w the message s followed by a debug dump of n.
+// FDump prints to w the message s followed by a debug dump of n.
// This includes all the recursive structure under n.
func FDump(w io.Writer, s string, n Node) {
fmt.Fprintf(w, "%s%+v\n", s, n)
diff --git a/src/encoding/json/v2/errors.go b/src/encoding/json/v2/errors.go
index da50bc30fc..599a274b53 100644
--- a/src/encoding/json/v2/errors.go
+++ b/src/encoding/json/v2/errors.go
@@ -165,7 +165,7 @@ func newUnmarshalErrorAfter(d *jsontext.Decoder, t reflect.Type, err error) erro
JSONKind: jsontext.Value(tokOrVal).Kind()}
}
-// newUnmarshalErrorAfter wraps err in a SemanticError assuming that d
+// newUnmarshalErrorAfterWithValue wraps err in a SemanticError assuming that d
// is positioned right after the previous token or value, which caused an error.
// It also stores a copy of the last JSON value if it is a string or number.
func newUnmarshalErrorAfterWithValue(d *jsontext.Decoder, t reflect.Type, err error) error {
diff --git a/src/internal/fuzz/encoding_test.go b/src/internal/fuzz/encoding_test.go
index 5f2af4476b..3fe42f44d3 100644
--- a/src/internal/fuzz/encoding_test.go
+++ b/src/internal/fuzz/encoding_test.go
@@ -269,7 +269,7 @@ func BenchmarkMarshalCorpusFile(b *testing.B) {
}
}
-// BenchmarkUnmarshalCorpusfile measures the time it takes to deserialize
+// BenchmarkUnmarshalCorpusFile measures the time it takes to deserialize
// files encoding byte slices of various sizes. The slice contains a repeating
// sequence of bytes 0-255 to mix escaped and non-escaped characters.
func BenchmarkUnmarshalCorpusFile(b *testing.B) {
diff --git a/src/os/root_windows.go b/src/os/root_windows.go
index da995e6d7f..ca3bea8fc3 100644
--- a/src/os/root_windows.go
+++ b/src/os/root_windows.go
@@ -185,7 +185,7 @@ func rootOpenDir(parent syscall.Handle, name string) (syscall.Handle, error) {
h, err := openat(parent, name, syscall.O_RDONLY|syscall.O_CLOEXEC|windows.O_DIRECTORY, 0)
if err == syscall.ERROR_FILE_NOT_FOUND {
// Windows returns:
- // - ERROR_PATH_NOT_FOUND if any path compoenent before the leaf
+ // - ERROR_PATH_NOT_FOUND if any path component before the leaf
// does not exist or is not a directory.
// - ERROR_FILE_NOT_FOUND if the leaf does not exist.
//