]> Cypherpunks repositories - gostls13.git/commitdiff
docs: fix spelling
authorJohn Bampton <jbampton@gmail.com>
Wed, 17 Feb 2021 01:48:21 +0000 (01:48 +0000)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Wed, 24 Feb 2021 04:11:43 +0000 (04:11 +0000)
Change-Id: Ib689e5793d9cb372e759c4f34af71f004010c822
GitHub-Last-Rev: d63798388e5dcccb984689b0ae39b87453b97393
GitHub-Pull-Request: golang/go#44259
Reviewed-on: https://go-review.googlesource.com/c/go/+/291949
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>

22 files changed:
src/cmd/compile/internal/ssa/value.go
src/cmd/go/testdata/mod/example.com_split-incompatible_subpkg_v0.1.0.txt
src/cmd/go/testdata/script/mod_empty_err.txt
src/cmd/go/testdata/script/mod_outside.txt
src/cmd/go/testdata/script/test_chatty_parallel_fail.txt
src/cmd/go/testdata/script/test_chatty_parallel_success.txt
src/cmd/go/testdata/script/test_chatty_parallel_success_sleepy.txt
src/cmd/internal/archive/archive_test.go
src/cmd/internal/goobj/objfile.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/x86/asm6.go
src/cmd/link/internal/ld/pcln.go
src/cmd/link/internal/loader/loader.go
src/crypto/tls/handshake_client_test.go
src/internal/poll/copy_file_range_linux.go
src/os/readfrom_linux_test.go
src/runtime/chan_test.go
src/runtime/lockrank_on.go
src/runtime/metrics.go
src/runtime/mgcscavenge.go
test/prove.go

index d000b7cce011a9de9e38e0327637230f037feda5..6539631b9cfbbd3b77b10b7a4166903443c61c99 100644 (file)
@@ -484,7 +484,7 @@ func (v *Value) removeable() bool {
        if v.Type.IsMemory() {
                // All memory ops aren't needed here, but we do need
                // to keep calls at least (because they might have
-               // syncronization operations we can't see).
+               // synchronization operations we can't see).
                return false
        }
        if v.Op.HasSideEffects() {
index 8f9e49176c7182994cb1645557be8122178c79f2..edf5d487885d4293a7178464953ebfa3a9dcd3a5 100644 (file)
@@ -1,6 +1,6 @@
 Written by hand.
 Test case for getting a package that has been moved to a nested module,
-with a +incompatible verison (and thus no go.mod file) at the root module.
+with a +incompatible version (and thus no go.mod file) at the root module.
 
 -- .mod --
 module example.com/split-incompatible/subpkg
index 982e6b2e518d9670fff09fb896f02acdc065dce5..c4359bccccf49cffd05862ee3dc3b41b60c26222 100644 (file)
@@ -1,4 +1,4 @@
-# This test checks error messages for non-existant packages in module mode.
+# This test checks error messages for non-existent packages in module mode.
 # Veries golang.org/issue/35414
 env GO111MODULE=on
 cd $WORK
index 8f01b5d242677502a87260d0a5e4d3a12459c2d3..7b45f1a209ea153c7032c80f58b40fc8e4b6e5ab 100644 (file)
@@ -200,7 +200,7 @@ stderr 'needmod[/\\]needmod.go:10:2: no required module provides package example
 go install cmd/addr2line
 ! stderr .
 
-# 'go run' with a verison should fail due to syntax.
+# 'go run' with a version should fail due to syntax.
 ! go run example.com/printversion@v1.0.0
 stderr 'can only use path@version syntax with'
 
index 3f7360b6592be4b2fe2adfe2ece716e14028406a..3b2791cb894863c2334f6be2afce771a52801454 100644 (file)
@@ -14,7 +14,7 @@ stdout -count=1 '{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"comma
 stdout -count=1 '{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"command-line-arguments","Test":"TestChattyParallel/sub-2","Output":"=== CONT  TestChattyParallel/sub-2\\n"}\n{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"command-line-arguments","Test":"TestChattyParallel/sub-2","Output":"    chatty_parallel_test.go:38: error from sub-2\\n"}'
 
 -- chatty_parallel_test.go --
-package chatty_paralell_test
+package chatty_parallel_test
 
 import (
        "testing"
index 4a86d74f19691175c13f3b5caa6c507c1543ec38..58b5ab726791c9a9396cc3f5dd4f5f890b662217 100644 (file)
@@ -13,7 +13,7 @@ stdout -count=2 '{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"comma
 stdout -count=2 '{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"command-line-arguments","Test":"TestChattyParallel/sub-2","Output":"=== CONT  TestChattyParallel/sub-2\\n"}\n{"Time":"[0-9TZ:.+-]{20,40}","Action":"output","Package":"command-line-arguments","Test":"TestChattyParallel/sub-2","Output":"    chatty_parallel_test.go:32: this is sub-2\\n"}'
 
 -- chatty_parallel_test.go --
-package chatty_paralell_test
+package chatty_parallel_test
 
 import (
        "testing"
index 5952a87beaba88f2fd87c01b37bf857e31090f05..e651a7ed243f6bb0ac48754a013c4d0abd28db78 100644 (file)
@@ -5,7 +5,7 @@ go test -parallel 3 chatty_parallel_test.go -v
 stdout '--- PASS: TestFast \([0-9.]{4}s\)\n=== CONT  TestSlow\n    chatty_parallel_test.go:31: this is the second TestSlow log\n--- PASS: TestSlow \([0-9.]{4}s\)'
 
 -- chatty_parallel_test.go --
-package chatty_paralell_test
+package chatty_parallel_test
 
 import (
        "testing"
index cb4eb842b452572102d7ff99c8c07d802be518b0..c284a9cf0dcc5331d13b9cc325972bd53ef8f068 100644 (file)
@@ -173,7 +173,7 @@ func TestParseGoobj(t *testing.T) {
                        continue
                }
                if e.Type != EntryGoObj {
-                       t.Errorf("wrong type of object: wnat EntryGoObj, got %v", e.Type)
+                       t.Errorf("wrong type of object: want EntryGoObj, got %v", e.Type)
                }
                if !bytes.Contains(e.Obj.TextHeader, []byte(runtime.GOARCH)) {
                        t.Errorf("text header does not contain GOARCH %s: %q", runtime.GOARCH, e.Obj.TextHeader)
@@ -204,7 +204,7 @@ func TestParseArchive(t *testing.T) {
                        continue
                }
                if e.Type != EntryGoObj {
-                       t.Errorf("wrong type of object: wnat EntryGoObj, got %v", e.Type)
+                       t.Errorf("wrong type of object: want EntryGoObj, got %v", e.Type)
                }
                if !bytes.Contains(e.Obj.TextHeader, []byte(runtime.GOARCH)) {
                        t.Errorf("text header does not contain GOARCH %s: %q", runtime.GOARCH, e.Obj.TextHeader)
index d1b838f676c8256963be3f02608107c294d2fe38..247cc695f07a1b514c56b29aa59f551c4b8c68c1 100644 (file)
@@ -481,7 +481,7 @@ func (r *RefFlags) SetFlag2(x uint8) { r[9] = x }
 
 func (r *RefFlags) Write(w *Writer) { w.Bytes(r[:]) }
 
-// Used to construct an artifically large array type when reading an
+// Used to construct an artificially large array type when reading an
 // item from the object file relocs section or aux sym section (needs
 // to work on 32-bit as well as 64-bit). See issue 41621.
 const huge = (1<<31 - 1) / RelocSize
index 85f0570e5df6a1057db39fe667dea0dfe075f975..b031afbc36906c4ed51d4db4e6e83cc282a8a5e9 100644 (file)
@@ -383,7 +383,7 @@ func (w *writer) Sym(s *LSym) {
 
 func (w *writer) Hash64(s *LSym) {
        if !s.ContentAddressable() || len(s.R) != 0 {
-               panic("Hash of non-content-addresable symbol")
+               panic("Hash of non-content-addressable symbol")
        }
        b := contentHash64(s)
        w.Bytes(b[:])
@@ -391,7 +391,7 @@ func (w *writer) Hash64(s *LSym) {
 
 func (w *writer) Hash(s *LSym) {
        if !s.ContentAddressable() {
-               panic("Hash of non-content-addresable symbol")
+               panic("Hash of non-content-addressable symbol")
        }
        b := w.contentHash(s)
        w.Bytes(b[:])
index 67c4f9a62bdf9ac383aff0802515539ebaae6725..7af81335fb10f61be799c90f4b50d5ca4331cbae 100644 (file)
@@ -37,7 +37,7 @@ func funcpctab(ctxt *Link, func_ *LSym, desc string, valfunc func(*Link, *LSym,
        oldval := val
        fn := func_.Func()
        if fn.Text == nil {
-               // Return the emtpy symbol we've built so far.
+               // Return the empty symbol we've built so far.
                return sym
        }
 
index a6b85ac4a06bd8cceb65e4fe83f8aab892dd32b7..fa670d5c181343929d0b6d1f7de1e46375b615eb 100644 (file)
@@ -1887,7 +1887,7 @@ func lookForJCC(p *obj.Prog) *obj.Prog {
 func fusedJump(p *obj.Prog) (bool, uint8) {
        var fusedSize uint8
 
-       // The first instruction in a macro fused pair may be preceeded by the LOCK prefix,
+       // The first instruction in a macro fused pair may be preceded by the LOCK prefix,
        // or possibly an XACQUIRE/XRELEASE prefix followed by a LOCK prefix. If it is, we
        // need to be careful to insert any padding before the locks rather than directly after them.
 
index fb733117be4bd6101c8addc46d1bb46431076942..61b64f4f5a1fd5f19566e073428b9b3015265027 100644 (file)
@@ -50,7 +50,7 @@ type pclntab struct {
 }
 
 // addGeneratedSym adds a generator symbol to pclntab, returning the new Sym.
-// It is the caller's responsibilty to save they symbol in state.
+// It is the caller's responsibility to save they symbol in state.
 func (state *pclntab) addGeneratedSym(ctxt *Link, name string, size int64, f generatorFunc) loader.Sym {
        size = Rnd(size, int64(ctxt.Arch.PtrSize))
        state.size += size
@@ -360,7 +360,7 @@ func (state *pclntab) generateFilenameTabs(ctxt *Link, compUnits []*sym.Compilat
        // then not loading extra filenames), and just use the hash value of the
        // symbol name to do this cataloging.
        //
-       // TOOD: Store filenames as symbols. (Note this would be easiest if you
+       // TODO: Store filenames as symbols. (Note this would be easiest if you
        // also move strings to ALWAYS using the larger content addressable hash
        // function, and use that hash value for uniqueness testing.)
        cuEntries := make([]goobj.CUFileIndex, len(compUnits))
index 68dc3de2738276c7afb1518845ee89a2a7bd21ea..c05309a14136de35b7a4006d00ca7712005da27b 100644 (file)
@@ -1547,7 +1547,7 @@ func (l *Loader) SymUnit(i Sym) *sym.CompilationUnit {
 // regular compiler-generated Go symbols), but in the case of
 // building with "-linkshared" (when a symbol is read from a
 // shared library), will hold the library name.
-// NOTE: this correspondes to sym.Symbol.File field.
+// NOTE: this corresponds to sym.Symbol.File field.
 func (l *Loader) SymPkg(i Sym) string {
        if f, ok := l.symPkg[i]; ok {
                return f
index 12b0254123e938a71dd6b8c0592db9cf235bf255..0e6c5a63702a93ae2d55f434d647591493a2f760 100644 (file)
@@ -1528,7 +1528,7 @@ func testVerifyConnection(t *testing.T, version uint16) {
                                        }
                                        if c.DidResume {
                                                return nil
-                                               // The SCTs and OCSP Responce are dropped on resumption.
+                                               // The SCTs and OCSP Response are dropped on resumption.
                                                // See http://golang.org/issue/39075.
                                        }
                                        if len(c.OCSPResponse) == 0 {
@@ -1569,7 +1569,7 @@ func testVerifyConnection(t *testing.T, version uint16) {
                                        }
                                        if c.DidResume {
                                                return nil
-                                               // The SCTs and OCSP Responce are dropped on resumption.
+                                               // The SCTs and OCSP Response are dropped on resumption.
                                                // See http://golang.org/issue/39075.
                                        }
                                        if len(c.OCSPResponse) == 0 {
@@ -1619,7 +1619,7 @@ func testVerifyConnection(t *testing.T, version uint16) {
                                        }
                                        if c.DidResume {
                                                return nil
-                                               // The SCTs and OCSP Responce are dropped on resumption.
+                                               // The SCTs and OCSP Response are dropped on resumption.
                                                // See http://golang.org/issue/39075.
                                        }
                                        if len(c.OCSPResponse) == 0 {
index 01b242a4ea4e8d8fe147fbd9b3fc785d81796e13..5b9e5d402068ee6610efea08e3697d582e275239 100644 (file)
@@ -78,7 +78,7 @@ func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err
                        // Go supports Linux >= 2.6.33, so the system call
                        // may not be present.
                        //
-                       // If we see ENOSYS, we have certainly not transfered
+                       // If we see ENOSYS, we have certainly not transferred
                        // any data, so we can tell the caller that we
                        // couldn't handle the transfer and let them fall
                        // back to more generic code.
@@ -91,13 +91,13 @@ func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err
                        // Prior to Linux 5.3, it was not possible to
                        // copy_file_range across file systems. Similarly to
                        // the ENOSYS case above, if we see EXDEV, we have
-                       // not transfered any data, and we can let the caller
+                       // not transferred any data, and we can let the caller
                        // fall back to generic code.
                        //
                        // As for EINVAL, that is what we see if, for example,
                        // dst or src refer to a pipe rather than a regular
                        // file. This is another case where no data has been
-                       // transfered, so we consider it unhandled.
+                       // transferred, so we consider it unhandled.
                        //
                        // If src and dst are on CIFS, we can see EIO.
                        // See issue #42334.
index 1d145dadb0870dea710871a360d68125d37cd5c7..cb6a59abdb2cf578847aa200bfc9c822aab080b3 100644 (file)
@@ -106,7 +106,7 @@ func TestCopyFileRange(t *testing.T) {
                                t.Fatal(err)
                        }
                        if n != int64(len(data)) {
-                               t.Fatalf("transfered %d, want %d", n, len(data))
+                               t.Fatalf("transferred %d, want %d", n, len(data))
                        }
                        if !hook.called {
                                t.Fatalf("should have called poll.CopyFileRange")
@@ -130,7 +130,7 @@ func TestCopyFileRange(t *testing.T) {
                                t.Fatal(err)
                        }
                        if n != int64(len(data)) {
-                               t.Fatalf("transfered %d, want %d", n, len(data))
+                               t.Fatalf("transferred %d, want %d", n, len(data))
                        }
                        if !hook.called {
                                t.Fatalf("should have called poll.CopyFileRange")
@@ -162,7 +162,7 @@ func TestCopyFileRange(t *testing.T) {
                                t.Fatal(err)
                        }
                        if n != int64(len(data)) {
-                               t.Fatalf("transfered %d, want %d", n, len(data))
+                               t.Fatalf("transferred %d, want %d", n, len(data))
                        }
                        if !hook.called {
                                t.Fatalf("should have called poll.CopyFileRange")
index 756bbbeccf587a8b323a54398fbc9bf478003d2c..003d6a9fb357fe8d0b2470dd6bcfadd4107aa8cd 100644 (file)
@@ -631,7 +631,7 @@ func TestNoShrinkStackWhileParking(t *testing.T) {
        // channel. See issue 40641 for more details on the problem.
        //
        // The way we try to induce this failure is to set up two
-       // goroutines: a sender and a reciever that communicate across
+       // goroutines: a sender and a receiver that communicate across
        // a channel. We try to set up a situation where the sender
        // grows its stack temporarily then *fully* blocks on a channel
        // often. Meanwhile a GC is triggered so that we try to get a
@@ -671,7 +671,7 @@ func TestNoShrinkStackWhileParking(t *testing.T) {
                go send(c, done)
                // Wait a little bit before triggering
                // the GC to make sure the sender and
-               // reciever have gotten into their groove.
+               // receiver have gotten into their groove.
                time.Sleep(50 * time.Microsecond)
                runtime.GC()
                <-done
index 702bf5f24cce52f49bfed9f7ca280a75aaea2feb..7d45debaca27f2f2db5a6264f5dcb6324be105b6 100644 (file)
@@ -220,7 +220,7 @@ func releaseLockRank(rank lockRank) {
 func lockWithRankMayAcquire(l *mutex, rank lockRank) {
        gp := getg()
        if gp.m.locksHeldLen == 0 {
-               // No possibilty of lock ordering problem if no other locks held
+               // No possibility of lock ordering problem if no other locks held
                return
        }
 
index 3e8dbda0cadf7112269625ed65f7301e8052455e..ce3bac9d8f1780bf78ff5407e34edfd0762f01ea 100644 (file)
@@ -481,7 +481,7 @@ func readMetrics(samplesp unsafe.Pointer, len int, cap int) {
 
        // Acquire the metricsSema but with handoff. This operation
        // is expensive enough that queueing up goroutines and handing
-       // off between them will be noticably better-behaved.
+       // off between them will be noticeably better-behaved.
        semacquire1(&metricsSema, true, 0, 0)
 
        // Ensure the map is initialized.
index a7c5bc49b874498694a7cc4c5305ea22deb81be7..46a40632bf482a8896ef6fe916e36c94fd6af77e 100644 (file)
@@ -207,7 +207,7 @@ func wakeScavenger() {
                // Ready the goroutine by injecting it. We use injectglist instead
                // of ready or goready in order to allow us to run this function
                // without a P. injectglist also avoids placing the goroutine in
-               // the current P's runnext slot, which is desireable to prevent
+               // the current P's runnext slot, which is desirable to prevent
                // the scavenger from interfering with user goroutine scheduling
                // too much.
                var list gList
index af9c06a6f7c0171af97ce7219d51c9f4d8ef1ebf..83b03808384cb659779ba3f73b3884517d1e7f4f 100644 (file)
@@ -1013,7 +1013,7 @@ func sh64noopt(n int64) int64 {
 // opt, an earlier pass, has already replaced it.
 // The fix for this issue allows prove to zero a right shift that was added as
 // part of the less-than-optimal reqwrite. That change by prove then allows
-// lateopt to clean up all the unneccesary parts of the original division
+// lateopt to clean up all the unnecessary parts of the original division
 // replacement. See issue #36159.
 func divShiftClean(n int) int {
        if n < 0 {