From 7e91cfb877048030d29a4b5628ec34f8e363007d Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Tue, 30 Jan 2024 15:19:54 +0000 Subject: [PATCH] all: fix typos Found by codespell. Change-Id: I2ebefbbbc8eacf9bc83051407519fa8fd5e4495f GitHub-Last-Rev: 9cc550f3dbd7c85194a58fd6858507db3e2962a9 GitHub-Pull-Request: golang/go#65346 Reviewed-on: https://go-review.googlesource.com/c/go/+/559095 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek --- src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go | 2 +- src/cmd/compile/internal/test/README | 2 +- src/cmd/go/internal/work/shell.go | 2 +- src/cmd/link/internal/arm64/asm.go | 2 +- src/cmd/link/internal/ld/inittask.go | 2 +- src/crypto/x509/oid_test.go | 2 +- src/internal/cpu/cpu_arm64_hwcap.go | 4 ++-- src/runtime/arena.go | 2 +- src/syscall/syscall_aix.go | 2 +- src/syscall/syscall_windows.go | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go b/src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go index b7403a4f8c..d86fd7d71b 100644 --- a/src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go +++ b/src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go @@ -134,7 +134,7 @@ func branchCombine(p1, p2 pstate) pstate { } // stateForList walks through a list of statements and computes the -// state/diposition for the entire list as a whole, as well +// state/disposition for the entire list as a whole, as well // as updating disposition of intermediate nodes. func (ffa *funcFlagsAnalyzer) stateForList(list ir.Nodes) pstate { st := psTop diff --git a/src/cmd/compile/internal/test/README b/src/cmd/compile/internal/test/README index 242ff794cb..3bf4a57a68 100644 --- a/src/cmd/compile/internal/test/README +++ b/src/cmd/compile/internal/test/README @@ -1,4 +1,4 @@ This directory holds small tests and benchmarks of code generated by the compiler. This code is not for importing, -and the tests are intended to verify that specific optimzations +and the tests are intended to verify that specific optimizations are applied and correct. diff --git a/src/cmd/go/internal/work/shell.go b/src/cmd/go/internal/work/shell.go index 6089170007..60817d9c3b 100644 --- a/src/cmd/go/internal/work/shell.go +++ b/src/cmd/go/internal/work/shell.go @@ -494,7 +494,7 @@ func (sh *Shell) reportCmd(desc, dir string, cmdOut []byte, cmdErr error) error } // Usually desc is already p.Desc(), but if not, signal cmdError.Error to - // add a line explicitly metioning the import path. + // add a line explicitly mentioning the import path. needsPath := importPath != "" && p != nil && desc != p.Desc() err := &cmdError{desc, out, importPath, needsPath} diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go index 6645795506..7b85bb3e26 100644 --- a/src/cmd/link/internal/arm64/asm.go +++ b/src/cmd/link/internal/arm64/asm.go @@ -1222,7 +1222,7 @@ func gensymlate(ctxt *ld.Link, ldr *loader.Loader) { // that relocations can target them with smaller addends. // On Windows, we only get 21 bits, again (presumably) signed. // Also, on Windows (always) and Darwin (for very large binaries), the external - // linker does't support CALL relocations with addend, so we generate "label" + // linker doesn't support CALL relocations with addend, so we generate "label" // symbols for functions of which we can target the middle (Duff's devices). if !ctxt.IsDarwin() && !ctxt.IsWindows() || !ctxt.IsExternal() { return diff --git a/src/cmd/link/internal/ld/inittask.go b/src/cmd/link/internal/ld/inittask.go index c4c5beb55e..ccf90b8b8c 100644 --- a/src/cmd/link/internal/ld/inittask.go +++ b/src/cmd/link/internal/ld/inittask.go @@ -152,7 +152,7 @@ func (ctxt *Link) inittaskSym(rootNames []string, symName string) loader.Sym { // Figure out the schedule. sched := ldr.MakeSymbolBuilder(symName) - sched.SetType(sym.SNOPTRDATA) // Could be SRODATA, but see isue 58857. + sched.SetType(sym.SNOPTRDATA) // Could be SRODATA, but see issue 58857. for !h.empty() { // Pick the lexicographically first initializable package. s := h.pop(ldr) diff --git a/src/crypto/x509/oid_test.go b/src/crypto/x509/oid_test.go index b2be1079c1..eb47244a73 100644 --- a/src/crypto/x509/oid_test.go +++ b/src/crypto/x509/oid_test.go @@ -78,7 +78,7 @@ func TestOID(t *testing.T) { if ok { t.Errorf("%v: oid.toASN1OID() unexpected success", v.raw) } else { - t.Errorf("%v: oid.toASN1OID() unexpected fauilure", v.raw) + t.Errorf("%v: oid.toASN1OID() unexpected failure", v.raw) } continue } diff --git a/src/internal/cpu/cpu_arm64_hwcap.go b/src/internal/cpu/cpu_arm64_hwcap.go index 2fabbb6edc..7f0504ca16 100644 --- a/src/internal/cpu/cpu_arm64_hwcap.go +++ b/src/internal/cpu/cpu_arm64_hwcap.go @@ -48,13 +48,13 @@ func hwcapInit(os string) { if ARM64.HasCPUID { midr := getMIDR() part_num := uint16((midr >> 4) & 0xfff) - implementor := byte((midr >> 24) & 0xff) + implementer := byte((midr >> 24) & 0xff) // d0c - NeoverseN1 // d40 - NeoverseV1 // d49 - NeoverseN2 // d4f - NeoverseV2 - if implementor == 'A' && (part_num == 0xd0c || part_num == 0xd40 || + if implementer == 'A' && (part_num == 0xd0c || part_num == 0xd40 || part_num == 0xd49 || part_num == 0xd4f) { ARM64.IsNeoverse = true } diff --git a/src/runtime/arena.go b/src/runtime/arena.go index e943817cee..e1fae834d7 100644 --- a/src/runtime/arena.go +++ b/src/runtime/arena.go @@ -765,7 +765,7 @@ func freeUserArenaChunk(s *mspan, x unsafe.Pointer) { throw("invalid user arena span size") } - // Mark the region as free to various santizers immediately instead + // Mark the region as free to various sanitizers immediately instead // of handling them at sweep time. if raceenabled { racefree(unsafe.Pointer(s.base()), s.elemsize) diff --git a/src/syscall/syscall_aix.go b/src/syscall/syscall_aix.go index 30e6887cce..18827e9e8b 100644 --- a/src/syscall/syscall_aix.go +++ b/src/syscall/syscall_aix.go @@ -222,7 +222,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, var status _C_int var r _Pid_t err = ERESTART - // AIX wait4 may return with ERESTART errno, while the processus is still + // AIX wait4 may return with ERESTART errno, while the process is still // active. for err == ERESTART { r, err = wait4(_Pid_t(pid), &status, options, rusage) diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go index d13acc5c44..1f46dec0a8 100644 --- a/src/syscall/syscall_windows.go +++ b/src/syscall/syscall_windows.go @@ -1261,7 +1261,7 @@ func Fchdir(fd Handle) (err error) { if err != nil { return err } - // When using VOLUME_NAME_DOS, the path is always pefixed by "\\?\". + // When using VOLUME_NAME_DOS, the path is always prefixed by "\\?\". // That prefix tells the Windows APIs to disable all string parsing and to send // the string that follows it straight to the file system. // Although SetCurrentDirectory and GetCurrentDirectory do support the "\\?\" prefix,