mirror of
https://github.com/golang/go
synced 2024-11-26 05:17:58 -07:00
docs: fix spelling
Change-Id: Ib689e5793d9cb372e759c4f34af71f004010c822
GitHub-Last-Rev: d63798388e
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>
This commit is contained in:
parent
43652dc46f
commit
6ba4a300d8
@ -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() {
|
||||
|
@ -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
|
||||
|
2
src/cmd/go/testdata/script/mod_empty_err.txt
vendored
2
src/cmd/go/testdata/script/mod_empty_err.txt
vendored
@ -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
|
||||
|
2
src/cmd/go/testdata/script/mod_outside.txt
vendored
2
src/cmd/go/testdata/script/mod_outside.txt
vendored
@ -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'
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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[:])
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user