aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorAlexander Yastrebov <yastrebov.alex@gmail.com>2023-06-13 23:01:11 +0000
committerGopher Robot <gobot@golang.org>2023-06-14 00:03:57 +0000
commit8ffc931eae8bb7a4654695be39d95b62d369ee5c (patch)
tree811f0e6845cffdb3c6f0e9fdc310b4ab71065144 /src/cmd
parent80629caecb5b21b718f5d1d01fefda6e8d3a5baf (diff)
downloadgo-8ffc931eae8bb7a4654695be39d95b62d369ee5c.tar.xz
all: fix spelling errors
Fix spelling errors discovered using https://github.com/codespell-project/codespell. Errors in data files and vendored packages are ignored. Change-Id: I83c7818222f2eea69afbd270c15b7897678131dc GitHub-Last-Rev: 3491615b1b82832cc0064f535786546e89aa6184 GitHub-Pull-Request: golang/go#60758 Reviewed-on: https://go-review.googlesource.com/c/go/+/502576 Auto-Submit: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/asm/internal/asm/parse.go2
-rw-r--r--src/cmd/asm/internal/asm/testdata/amd64error.s2
-rw-r--r--src/cmd/cgo/internal/test/test.go2
-rw-r--r--src/cmd/compile/internal/base/timings.go2
-rw-r--r--src/cmd/compile/internal/escape/call.go2
-rw-r--r--src/cmd/compile/internal/ssa/_gen/ARM64.rules2
-rw-r--r--src/cmd/compile/internal/ssa/config.go2
-rw-r--r--src/cmd/compile/internal/ssa/debug.go2
-rw-r--r--src/cmd/compile/internal/ssa/expand_calls.go2
-rw-r--r--src/cmd/compile/internal/ssa/poset.go4
-rw-r--r--src/cmd/compile/internal/ssa/prove.go2
-rw-r--r--src/cmd/compile/internal/ssa/rewrite.go4
-rw-r--r--src/cmd/compile/internal/ssa/schedule.go2
-rw-r--r--src/cmd/compile/internal/walk/range.go2
-rw-r--r--src/cmd/compile/internal/walk/temp.go2
-rw-r--r--src/cmd/covdata/metamerge.go2
-rw-r--r--src/cmd/covdata/tool_test.go2
-rw-r--r--src/cmd/go/internal/load/pkg.go2
-rw-r--r--src/cmd/go/internal/modget/get.go4
-rw-r--r--src/cmd/go/internal/modget/query.go2
-rw-r--r--src/cmd/go/internal/modindex/read.go2
-rw-r--r--src/cmd/go/internal/vcweb/vcweb.go2
-rw-r--r--src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt2
-rw-r--r--src/cmd/go/testdata/script/env_cross_build.txt2
-rw-r--r--src/cmd/go/testdata/script/mod_deprecate_message.txt2
-rw-r--r--src/cmd/go/testdata/script/mod_get_moved.txt2
-rw-r--r--src/cmd/go/testdata/script/mod_get_split.txt2
-rw-r--r--src/cmd/go/testdata/script/mod_install_pkg_version.txt2
-rw-r--r--src/cmd/go/testdata/script/mod_tidy_compat_added.txt4
-rw-r--r--src/cmd/internal/cov/readcovdata.go2
-rw-r--r--src/cmd/internal/obj/arm64/a.out.go4
-rw-r--r--src/cmd/internal/obj/wasm/wasmobj.go2
-rw-r--r--src/cmd/internal/objabi/reloctype.go4
-rw-r--r--src/cmd/internal/testdir/testdir_test.go2
-rw-r--r--src/cmd/link/internal/ld/dwarf.go2
-rw-r--r--src/cmd/link/internal/ld/pe.go2
-rw-r--r--src/cmd/link/internal/loader/loader.go2
-rw-r--r--src/cmd/trace/main.go2
38 files changed, 44 insertions, 44 deletions
diff --git a/src/cmd/asm/internal/asm/parse.go b/src/cmd/asm/internal/asm/parse.go
index e26c945a8a..37f8e6c0bc 100644
--- a/src/cmd/asm/internal/asm/parse.go
+++ b/src/cmd/asm/internal/asm/parse.go
@@ -1149,7 +1149,7 @@ ListLoop:
}
a.Offset = offset
default:
- p.errorf("register list not supported on this architecuture")
+ p.errorf("register list not supported on this architecture")
}
}
diff --git a/src/cmd/asm/internal/asm/testdata/amd64error.s b/src/cmd/asm/internal/asm/testdata/amd64error.s
index 1ca2d3147c..e9a1d0acb2 100644
--- a/src/cmd/asm/internal/asm/testdata/amd64error.s
+++ b/src/cmd/asm/internal/asm/testdata/amd64error.s
@@ -132,7 +132,7 @@ TEXT errors(SB),$0
VADDPD.BCST X3, X2, K1, X1 // ERROR "illegal broadcast without memory argument"
VADDPD.BCST X3, X2, K1, X1 // ERROR "illegal broadcast without memory argument"
VADDPD.BCST X3, X2, K1, X1 // ERROR "illegal broadcast without memory argument"
- // CLWB instuctions:
+ // CLWB instructions:
CLWB BX // ERROR "invalid instruction"
// CLDEMOTE instructions:
CLDEMOTE BX // ERROR "invalid instruction"
diff --git a/src/cmd/cgo/internal/test/test.go b/src/cmd/cgo/internal/test/test.go
index 1529ca5928..8e24f2e618 100644
--- a/src/cmd/cgo/internal/test/test.go
+++ b/src/cmd/cgo/internal/test/test.go
@@ -115,7 +115,7 @@ int add(int x, int y) {
return x+y;
};
-// Following mimicks vulkan complex definitions for benchmarking cgocheck overhead.
+// Following mimics vulkan complex definitions for benchmarking cgocheck overhead.
typedef uint32_t VkFlags;
typedef VkFlags VkDeviceQueueCreateFlags;
diff --git a/src/cmd/compile/internal/base/timings.go b/src/cmd/compile/internal/base/timings.go
index f599f4e05f..f48ac93699 100644
--- a/src/cmd/compile/internal/base/timings.go
+++ b/src/cmd/compile/internal/base/timings.go
@@ -14,7 +14,7 @@ import (
var Timer Timings
// Timings collects the execution times of labeled phases
-// which are added trough a sequence of Start/Stop calls.
+// which are added through a sequence of Start/Stop calls.
// Events may be associated with each phase via AddEvent.
type Timings struct {
list []timestamp
diff --git a/src/cmd/compile/internal/escape/call.go b/src/cmd/compile/internal/escape/call.go
index e88cae0969..c69eca1998 100644
--- a/src/cmd/compile/internal/escape/call.go
+++ b/src/cmd/compile/internal/escape/call.go
@@ -115,7 +115,7 @@ func (e *escape) callCommon(ks []hole, call ir.Node, init *ir.Nodes, wrapper *ir
args := call.Args
if recv := fntype.Recv(); recv != nil {
if recvp == nil {
- // Function call using method expression. Recevier argument is
+ // Function call using method expression. Receiver argument is
// at the front of the regular arguments list.
recvp = &args[0]
args = args[1:]
diff --git a/src/cmd/compile/internal/ssa/_gen/ARM64.rules b/src/cmd/compile/internal/ssa/_gen/ARM64.rules
index 7b2016bff2..bb9ad1006d 100644
--- a/src/cmd/compile/internal/ssa/_gen/ARM64.rules
+++ b/src/cmd/compile/internal/ssa/_gen/ARM64.rules
@@ -62,7 +62,7 @@
(Sqrt32 ...) => (FSQRTS ...)
// lowering rotates
-// we do rotate detection in generic rules, if the following rules need to be changed, chcek generic rules first.
+// we do rotate detection in generic rules, if the following rules need to be changed, check generic rules first.
(RotateLeft8 <t> x (MOVDconst [c])) => (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
(RotateLeft8 <t> x y) => (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
(RotateLeft16 <t> x (MOVDconst [c])) => (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go
index 0740d9b7b0..43f9f0affc 100644
--- a/src/cmd/compile/internal/ssa/config.go
+++ b/src/cmd/compile/internal/ssa/config.go
@@ -143,7 +143,7 @@ type Logger interface {
type Frontend interface {
Logger
- // CanSSA reports whether variabbles of type t are SSA-able.
+ // CanSSA reports whether variables of type t are SSA-able.
CanSSA(t *types.Type) bool
// StringData returns a symbol pointing to the given string's contents.
diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go
index 0af052294b..63934662a5 100644
--- a/src/cmd/compile/internal/ssa/debug.go
+++ b/src/cmd/compile/internal/ssa/debug.go
@@ -969,7 +969,7 @@ func (state *debugState) mergePredecessors(b *Block, blockLocs []*BlockDebug, pr
}
state.currentState.reset(abt.T{})
- // The normal logic of "reset" is incuded in the intersection loop below.
+ // The normal logic of "reset" is included in the intersection loop below.
slotLocs := state.currentState.slots
diff --git a/src/cmd/compile/internal/ssa/expand_calls.go b/src/cmd/compile/internal/ssa/expand_calls.go
index dcd8078353..e0b0b59992 100644
--- a/src/cmd/compile/internal/ssa/expand_calls.go
+++ b/src/cmd/compile/internal/ssa/expand_calls.go
@@ -276,7 +276,7 @@ func (x *expandState) indent(n int) {
x.indentLevel += n
}
-// Printf does an indented fmt.Printf on te format and args.
+// Printf does an indented fmt.Printf on the format and args.
func (x *expandState) Printf(format string, a ...interface{}) (n int, err error) {
if x.indentLevel > 0 {
fmt.Printf("%[1]*s", x.indentLevel, "")
diff --git a/src/cmd/compile/internal/ssa/poset.go b/src/cmd/compile/internal/ssa/poset.go
index 19d9f9004d..fd2887d020 100644
--- a/src/cmd/compile/internal/ssa/poset.go
+++ b/src/cmd/compile/internal/ssa/poset.go
@@ -964,7 +964,7 @@ func (po *poset) NonEqual(n1, n2 *Value) bool {
return false
}
- // Check if we recored inequality
+ // Check if we recorded inequality
if po.isnoneq(i1, i2) {
return true
}
@@ -1166,7 +1166,7 @@ func (po *poset) SetEqual(n1, n2 *Value) bool {
}
// If we already knew that n1<=n2, we can collapse the path to
- // record n1==n2 (and viceversa).
+ // record n1==n2 (and vice versa).
if po.reaches(i1, i2, false) {
return po.collapsepath(n1, n2)
}
diff --git a/src/cmd/compile/internal/ssa/prove.go b/src/cmd/compile/internal/ssa/prove.go
index 94d2c525b9..38758c3361 100644
--- a/src/cmd/compile/internal/ssa/prove.go
+++ b/src/cmd/compile/internal/ssa/prove.go
@@ -1195,7 +1195,7 @@ func addBranchRestrictions(ft *factsTable, b *Block, br branch) {
func addRestrictions(parent *Block, ft *factsTable, t domain, v, w *Value, r relation) {
if t == 0 {
// Trivial case: nothing to do.
- // Shoult not happen, but just in case.
+ // Should not happen, but just in case.
return
}
for i := domain(1); i <= t; i <<= 1 {
diff --git a/src/cmd/compile/internal/ssa/rewrite.go b/src/cmd/compile/internal/ssa/rewrite.go
index 29fd89c28a..6ee661dbbd 100644
--- a/src/cmd/compile/internal/ssa/rewrite.go
+++ b/src/cmd/compile/internal/ssa/rewrite.go
@@ -1555,7 +1555,7 @@ func mergePPC64AndSrwi(m, s int64) int64 {
// Return the encoded RLWINM constant, or 0 if they cannot be merged.
func mergePPC64ClrlsldiSrw(sld, srw int64) int64 {
mask_1 := uint64(0xFFFFFFFF >> uint(srw))
- // for CLRLSLDI, it's more convient to think of it as a mask left bits then rotate left.
+ // for CLRLSLDI, it's more convenient to think of it as a mask left bits then rotate left.
mask_2 := uint64(0xFFFFFFFFFFFFFFFF) >> uint(GetPPC64Shiftmb(int64(sld)))
// Rewrite mask to apply after the final left shift.
@@ -1575,7 +1575,7 @@ func mergePPC64ClrlsldiSrw(sld, srw int64) int64 {
// the encoded RLWINM constant, or 0 if they cannot be merged.
func mergePPC64ClrlsldiRlwinm(sld int32, rlw int64) int64 {
r_1, _, _, mask_1 := DecodePPC64RotateMask(rlw)
- // for CLRLSLDI, it's more convient to think of it as a mask left bits then rotate left.
+ // for CLRLSLDI, it's more convenient to think of it as a mask left bits then rotate left.
mask_2 := uint64(0xFFFFFFFFFFFFFFFF) >> uint(GetPPC64Shiftmb(int64(sld)))
// combine the masks, and adjust for the final left shift.
diff --git a/src/cmd/compile/internal/ssa/schedule.go b/src/cmd/compile/internal/ssa/schedule.go
index 49bad25765..19b98cc4b8 100644
--- a/src/cmd/compile/internal/ssa/schedule.go
+++ b/src/cmd/compile/internal/ssa/schedule.go
@@ -185,7 +185,7 @@ func schedule(f *Func) {
// Schedule flag register generation as late as possible.
// This makes sure that we only have one live flags
// value at a time.
- // Note that this case is afer the case above, so values
+ // Note that this case is after the case above, so values
// which both read and generate flags are given ScoreReadFlags.
score[v.ID] = ScoreFlags
default:
diff --git a/src/cmd/compile/internal/walk/range.go b/src/cmd/compile/internal/walk/range.go
index 1d757a62a5..38479b323f 100644
--- a/src/cmd/compile/internal/walk/range.go
+++ b/src/cmd/compile/internal/walk/range.go
@@ -199,7 +199,7 @@ func walkRange(nrange *ir.RangeStmt) ir.Node {
hu := typecheck.Temp(types.Types[types.TUINTPTR])
init = append(init, ir.NewAssignStmt(base.Pos, hu, huVal))
- // Convert hu to hp at the top of the loop (afer the condition has been checked).
+ // Convert hu to hp at the top of the loop (after the condition has been checked).
hpVal := ir.NewConvExpr(base.Pos, ir.OCONVNOP, types.Types[types.TUNSAFEPTR], hu)
hpVal.SetCheckPtr(true) // disable checkptr on this conversion
hpVal = ir.NewConvExpr(base.Pos, ir.OCONVNOP, elem.PtrTo(), hpVal)
diff --git a/src/cmd/compile/internal/walk/temp.go b/src/cmd/compile/internal/walk/temp.go
index 9879a6c69d..d2ffb226a9 100644
--- a/src/cmd/compile/internal/walk/temp.go
+++ b/src/cmd/compile/internal/walk/temp.go
@@ -28,7 +28,7 @@ func stackTempAddr(init *ir.Nodes, typ *types.Type) *ir.AddrExpr {
return initStackTemp(init, typecheck.Temp(typ), nil)
}
-// stackBufAddr returns thte expression &tmp, where tmp is a newly
+// stackBufAddr returns the expression &tmp, where tmp is a newly
// allocated temporary variable of type [len]elem. This variable is
// initialized, and elem must not contain pointers.
func stackBufAddr(len int64, elem *types.Type) *ir.AddrExpr {
diff --git a/src/cmd/covdata/metamerge.go b/src/cmd/covdata/metamerge.go
index c5a1a73a48..6c68e0c722 100644
--- a/src/cmd/covdata/metamerge.go
+++ b/src/cmd/covdata/metamerge.go
@@ -160,7 +160,7 @@ func (mm *metaMerge) beginPod() {
// the things in a pod -- counter files and meta-data file. There are
// three cases of interest here:
//
-// Case 1: in an unconditonal merge (we're not selecting a specific set of
+// Case 1: in an unconditional merge (we're not selecting a specific set of
// packages using "-pkg", and the "-pcombine" option is not in use),
// we can simply copy over the meta-data file from input to output.
//
diff --git a/src/cmd/covdata/tool_test.go b/src/cmd/covdata/tool_test.go
index b6c2465812..d99113ebc5 100644
--- a/src/cmd/covdata/tool_test.go
+++ b/src/cmd/covdata/tool_test.go
@@ -672,7 +672,7 @@ func testMergeCombinePrograms(t *testing.T, s state) {
t.Errorf("merge run produced unexpected output: %v", lines)
}
- // We expect the merge tool to produce exacty two files: a meta
+ // We expect the merge tool to produce exactly two files: a meta
// data file and a counter file. If we get more than just this one
// pair, something went wrong.
podlist, err := pods.CollectPods([]string{moutdir}, true)
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
index a4b523f2c9..c0e6265e29 100644
--- a/src/cmd/go/internal/load/pkg.go
+++ b/src/cmd/go/internal/load/pkg.go
@@ -2940,7 +2940,7 @@ func setPGOProfilePath(pkgs []*Package) {
// Locate PGO profiles from the main packages, and
// attach the profile to the main package and its
// dependencies.
- // If we're builing multiple main packages, they may
+ // If we're building multiple main packages, they may
// have different profiles. We may need to split (unshare)
// the dependency graph so they can attach different
// profiles.
diff --git a/src/cmd/go/internal/modget/get.go b/src/cmd/go/internal/modget/get.go
index 5d9eb70489..37befa39c9 100644
--- a/src/cmd/go/internal/modget/get.go
+++ b/src/cmd/go/internal/modget/get.go
@@ -344,7 +344,7 @@ func runGet(ctx context.Context, cmd *base.Command, args []string) {
// The result of any version query for a given module — even "upgrade" or
// "patch" — is always relative to the build list at the start of
// the 'go get' command, not an intermediate state, and is therefore
- // dederministic and therefore cachable, and the constraints on the
+ // deterministic and therefore cachable, and the constraints on the
// selected version of each module can only narrow as we iterate.
//
// "all" is functionally very similar to a wildcard pattern. The set of
@@ -359,7 +359,7 @@ func runGet(ctx context.Context, cmd *base.Command, args []string) {
// When we load imports, we detect the following conditions:
//
- // - missing transitive depencies that need to be resolved from outside the
+ // - missing transitive dependencies that need to be resolved from outside the
// current build list (note that these may add new matches for existing
// pattern queries!)
//
diff --git a/src/cmd/go/internal/modget/query.go b/src/cmd/go/internal/modget/query.go
index 6612f9b112..68706e7c79 100644
--- a/src/cmd/go/internal/modget/query.go
+++ b/src/cmd/go/internal/modget/query.go
@@ -98,7 +98,7 @@ type query struct {
resolved []module.Version
// matchesPackages is true if the resolved modules provide at least one
- // package mathcing q.pattern.
+ // package matching q.pattern.
matchesPackages bool
}
diff --git a/src/cmd/go/internal/modindex/read.go b/src/cmd/go/internal/modindex/read.go
index 1c53e8314f..238355732c 100644
--- a/src/cmd/go/internal/modindex/read.go
+++ b/src/cmd/go/internal/modindex/read.go
@@ -61,7 +61,7 @@ func moduleHash(modroot string, ismodcache bool) (cache.ActionID, error) {
//
// Note that this is true even for modules in GOROOT/src: non-release builds
// of the Go toolchain may have arbitrary development changes on top of the
- // commit reported by runtime.Version, or could be completly artificial due
+ // commit reported by runtime.Version, or could be completely artificial due
// to lacking a `git` binary (like "devel gomote.XXXXX", as synthesized by
// "gomote push" as of 2022-06-15). (Release builds shouldn't have
// modifications, but we don't want to use a behavior for releases that we
diff --git a/src/cmd/go/internal/vcweb/vcweb.go b/src/cmd/go/internal/vcweb/vcweb.go
index e1f12827c1..f748b34358 100644
--- a/src/cmd/go/internal/vcweb/vcweb.go
+++ b/src/cmd/go/internal/vcweb/vcweb.go
@@ -362,7 +362,7 @@ func (s *Server) overview(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "<title>vcweb</title>\n<pre>\n")
fmt.Fprintf(w, "<b>vcweb</b>\n\n")
fmt.Fprintf(w, "This server serves various version control repos for testing the go command.\n\n")
- fmt.Fprintf(w, "For an overview of the script lanugage, see <a href=\"/help\">/help</a>.\n\n")
+ fmt.Fprintf(w, "For an overview of the script language, see <a href=\"/help\">/help</a>.\n\n")
fmt.Fprintf(w, "<b>cache</b>\n")
diff --git a/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt b/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt
index b2c84a387c..e5bcdc6cfa 100644
--- a/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt
+++ b/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt
@@ -18,7 +18,7 @@
# non-standard host objects.
#
# As of 1.21 we continue to use internal linking for programs whose
-# CGO use comes ony from stdlib packages in the absence of any flag
+# CGO use comes only from stdlib packages in the absence of any flag
# funny business, however if the Go command sees flags that may be suspicious,
# it signals the Go linker to invoke the external linker.
diff --git a/src/cmd/go/testdata/script/env_cross_build.txt b/src/cmd/go/testdata/script/env_cross_build.txt
index 3feeba6b14..91d1cb936d 100644
--- a/src/cmd/go/testdata/script/env_cross_build.txt
+++ b/src/cmd/go/testdata/script/env_cross_build.txt
@@ -1,4 +1,4 @@
-# Test that the corect default GOEXPERIMENT is used when cross
+# Test that the correct default GOEXPERIMENT is used when cross
# building with GOENV (#46815).
# Unset variables set by the TestScript harness. Users typically won't
diff --git a/src/cmd/go/testdata/script/mod_deprecate_message.txt b/src/cmd/go/testdata/script/mod_deprecate_message.txt
index 8e2771dc1f..1fb12468a5 100644
--- a/src/cmd/go/testdata/script/mod_deprecate_message.txt
+++ b/src/cmd/go/testdata/script/mod_deprecate_message.txt
@@ -17,7 +17,7 @@ stderr '^go: module long is deprecated: \(message omitted: too long\)$'
go list -m -u -f '{{.Deprecated}}' long
stdout '^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$'
-# When a message contains unprintable chracters, 'go get' should say that
+# When a message contains unprintable characters, 'go get' should say that
# without printing the message.
go get unprintable
stderr '^go: module unprintable is deprecated: \(message omitted: contains non-printable characters\)$'
diff --git a/src/cmd/go/testdata/script/mod_get_moved.txt b/src/cmd/go/testdata/script/mod_get_moved.txt
index ba79c8263c..cc35b4c8fa 100644
--- a/src/cmd/go/testdata/script/mod_get_moved.txt
+++ b/src/cmd/go/testdata/script/mod_get_moved.txt
@@ -8,7 +8,7 @@ go get example.com/split/subpkg@v1.0.0
go list -m all
stdout 'example.com/split v1.0.0'
-# A 'go get' that simultaneously upgrades away conflicting package defitions is not ambiguous.
+# A 'go get' that simultaneously upgrades away conflicting package definitions is not ambiguous.
go get example.com/split/subpkg@v1.1.0
# A 'go get' without an upgrade should find the package.
diff --git a/src/cmd/go/testdata/script/mod_get_split.txt b/src/cmd/go/testdata/script/mod_get_split.txt
index 0552da24ea..6c2f00d37e 100644
--- a/src/cmd/go/testdata/script/mod_get_split.txt
+++ b/src/cmd/go/testdata/script/mod_get_split.txt
@@ -52,7 +52,7 @@ stderr '^go: example.net/split/nested: ambiguous import: found package example.n
# (perhaps 'latest' or 'none'), or we can report an error and the let the user
# disambiguate. We would rather not choose arbitrarily, so we do the latter.
#
-# TODO(#27899): Should we instead upgrade or downgrade to an arbirary version?
+# TODO(#27899): Should we instead upgrade or downgrade to an arbitrary version?
! go get example.net/split/nested/...@v0.1.0
stderr '^go: example.net/split/nested/\.\.\.@v0.1.0 matches packages in example.net/split@v0.2.0 but not example.net/split@v0.1.0: specify a different version for module example.net/split$'
diff --git a/src/cmd/go/testdata/script/mod_install_pkg_version.txt b/src/cmd/go/testdata/script/mod_install_pkg_version.txt
index a4a26ba9f3..89dfc1458c 100644
--- a/src/cmd/go/testdata/script/mod_install_pkg_version.txt
+++ b/src/cmd/go/testdata/script/mod_install_pkg_version.txt
@@ -142,7 +142,7 @@ stderr '^go: example.com/cmd/nomatch\.\.\.@v1.0.0: module example.com/cmd@v1.0.0
go install example.com/cmd/a@v1.0.0 example.com/cmd/nomatch...@v1.0.0
stderr '^go: warning: "example.com/cmd/nomatch\.\.\." matched no packages$'
-# If a wildcard matches only non-main packges, we should see a different warning.
+# If a wildcard matches only non-main packages, we should see a different warning.
go install example.com/cmd/err...@v1.0.0
stderr '^go: warning: "example.com/cmd/err\.\.\." matched only non-main packages$'
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_added.txt b/src/cmd/go/testdata/script/mod_tidy_compat_added.txt
index 7a4a9f9672..b3f75adfe9 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_added.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_added.txt
@@ -23,9 +23,9 @@ cmp go.mod go.mod.orig
# When we run 'go mod tidy -e', we should proceed past the first error and follow
-# it with a second error describing the version descrepancy.
+# it with a second error describing the version discrepancy.
#
-# We should not provide advice on how to push past the version descrepancy,
+# We should not provide advice on how to push past the version discrepancy,
# because the '-e' flag should already do that, writing out an otherwise-tidied
# go.mod file.
diff --git a/src/cmd/internal/cov/readcovdata.go b/src/cmd/internal/cov/readcovdata.go
index 65076d72e8..086be40e90 100644
--- a/src/cmd/internal/cov/readcovdata.go
+++ b/src/cmd/internal/cov/readcovdata.go
@@ -108,7 +108,7 @@ type CovDataVisitor interface {
EndCounters()
// Invoked for each package in the meta-data file for the pod,
- // first the 'begin' method when processinf of the package starts,
+ // first the 'begin' method when processing of the package starts,
// then the 'end' method when we're done
BeginPackage(pd *decodemeta.CoverageMetaDataDecoder, pkgIdx uint32)
EndPackage(pd *decodemeta.CoverageMetaDataDecoder, pkgIdx uint32)
diff --git a/src/cmd/internal/obj/arm64/a.out.go b/src/cmd/internal/obj/arm64/a.out.go
index 15cbd0371e..fc170e737d 100644
--- a/src/cmd/internal/obj/arm64/a.out.go
+++ b/src/cmd/internal/obj/arm64/a.out.go
@@ -193,8 +193,8 @@ const (
// compiler allocates external registers F26 down
const (
REGMIN = REG_R7 // register variables allocated from here to REGMAX
- REGRT1 = REG_R16 // ARM64 IP0, external linker may use as a scrach register in trampoline
- REGRT2 = REG_R17 // ARM64 IP1, external linker may use as a scrach register in trampoline
+ REGRT1 = REG_R16 // ARM64 IP0, external linker may use as a scratch register in trampoline
+ REGRT2 = REG_R17 // ARM64 IP1, external linker may use as a scratch register in trampoline
REGPR = REG_R18 // ARM64 platform register, unused in the Go toolchain
REGMAX = REG_R25
diff --git a/src/cmd/internal/obj/wasm/wasmobj.go b/src/cmd/internal/obj/wasm/wasmobj.go
index 83b9329f12..23f51f8b42 100644
--- a/src/cmd/internal/obj/wasm/wasmobj.go
+++ b/src/cmd/internal/obj/wasm/wasmobj.go
@@ -228,7 +228,7 @@ func preprocess(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) {
for _, f := range wi.Params {
// Each load instructions will consume the value of sp on the stack, so
// we need to read sp for each param. WASM appears to not have a stack dup instruction
- // (a strange ommission for a stack-based VM), if it did, we'd be using the dup here.
+ // (a strange omission for a stack-based VM), if it did, we'd be using the dup here.
p = appendp(p, AGet, regAddr(REG_SP))
// Offset is the location of the param on the Go stack (ie relative to sp).
diff --git a/src/cmd/internal/objabi/reloctype.go b/src/cmd/internal/objabi/reloctype.go
index 0b231855ec..996c300d95 100644
--- a/src/cmd/internal/objabi/reloctype.go
+++ b/src/cmd/internal/objabi/reloctype.go
@@ -84,7 +84,7 @@ const (
R_USETYPE
// R_USEIFACE marks a type is converted to an interface in the function this
// relocation is applied to. The target is a type descriptor or an itab
- // (in the latter case it refers to the conrete type contained in the itab).
+ // (in the latter case it refers to the concrete type contained in the itab).
// This is a marker relocation (0-sized), for the linker's reachabililty
// analysis.
R_USEIFACE
@@ -230,7 +230,7 @@ const (
R_ADDRPOWER_GOT
// R_ADDRPOWER_GOT_PCREL34 is identical to R_ADDRPOWER_GOT, but uses a PC relative
- // sequence to generate a GOT symbol addresss.
+ // sequence to generate a GOT symbol addresses.
R_ADDRPOWER_GOT_PCREL34
// R_ADDRPOWER_PCREL relocates two D-form instructions like R_ADDRPOWER, but
diff --git a/src/cmd/internal/testdir/testdir_test.go b/src/cmd/internal/testdir/testdir_test.go
index f10dacb974..f5bd44eef2 100644
--- a/src/cmd/internal/testdir/testdir_test.go
+++ b/src/cmd/internal/testdir/testdir_test.go
@@ -201,7 +201,7 @@ func compileInDir(runcmd runCmd, dir string, flags []string, importcfg string, p
return runcmd(cmd...)
}
-var stdlibImportcfgStringOnce sync.Once // TODO(#56102): Use sync.OnceValue once availabe. Also below.
+var stdlibImportcfgStringOnce sync.Once // TODO(#56102): Use sync.OnceValue once available. Also below.
var stdlibImportcfgString string
func stdlibImportcfg() string {
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go
index aef46872bb..a601fe5a0d 100644
--- a/src/cmd/link/internal/ld/dwarf.go
+++ b/src/cmd/link/internal/ld/dwarf.go
@@ -1989,7 +1989,7 @@ type dwUnitSyms struct {
// dwUnitPortion assembles the DWARF content for a given compilation
// unit: debug_info, debug_lines, debug_ranges, debug_loc (debug_frame
-// is handled elsewere). Order is important; the calls to writelines
+// is handled elsewhere). Order is important; the calls to writelines
// and writepcranges below make updates to the compilation unit DIE,
// hence they have to happen before the call to writeUnitInfo.
func (d *dwctxt) dwUnitPortion(u *sym.CompilationUnit, abbrevsym loader.Sym, us *dwUnitSyms) {
diff --git a/src/cmd/link/internal/ld/pe.go b/src/cmd/link/internal/ld/pe.go
index 9f4b00371a..1502b3eb39 100644
--- a/src/cmd/link/internal/ld/pe.go
+++ b/src/cmd/link/internal/ld/pe.go
@@ -779,7 +779,7 @@ func (f *peFile) writeSymbols(ctxt *Link) {
// - https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#export-address-table
// - https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/pe-dll.c;h=e7b82ba6ffadf74dc1b9ee71dc13d48336941e51;hb=HEAD#l972)
//
- // CL 317917 changes "." to ":" in symbols name, so theses symbols can not be
+ // CL 317917 changes "." to ":" in symbols name, so these symbols can not be
// found by external linker anymore. So a hacky way is adding the
// underscore prefix for these 2 symbols. I don't have enough knowledge to
// verify whether adding the underscore for all STEXT/STYPE symbols are
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index 49199bdd69..4d0b497d8e 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -1126,7 +1126,7 @@ func (l *Loader) SetAttrReadOnly(i Sym, v bool) {
//
// - Outer symbol covers the address ranges of its sub-symbols.
// Outer.Sub is set in this case.
-// - Outer symbol doesn't conver the address ranges. It is zero-sized
+// - Outer symbol doesn't cover the address ranges. It is zero-sized
// and doesn't have sub-symbols. In the case, the inner symbol is
// not actually a "SubSymbol". (Tricky!)
//
diff --git a/src/cmd/trace/main.go b/src/cmd/trace/main.go
index 0e4d882c97..9e9e7f3e49 100644
--- a/src/cmd/trace/main.go
+++ b/src/cmd/trace/main.go
@@ -124,7 +124,7 @@ func main() {
log.Print("Splitting trace...")
ranges = splitTrace(res)
- reportMemoryUsage("after spliting trace")
+ reportMemoryUsage("after splitting trace")
debug.FreeOSMemory()
addr := "http://" + ln.Addr().String()