Skip to content

Commit

Permalink
all: fix typos and spelling
Browse files Browse the repository at this point in the history
Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913
Reviewed-on: https://go-review.googlesource.com/19829
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
martisch authored and bradfitz committed Feb 24, 2016
1 parent 4feb47b commit fdd0179
Show file tree
Hide file tree
Showing 92 changed files with 115 additions and 115 deletions.
2 changes: 1 addition & 1 deletion src/bufio/bufio.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func (b *Writer) ReadFrom(r io.Reader) (n int64, err error) {
}
}
if err == io.EOF {
// If we filled the buffer exactly, flush pre-emptively.
// If we filled the buffer exactly, flush preemptively.
if b.Available() == 0 {
err = b.flush()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/bufio/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func TestSplitError(t *testing.T) {
// Test that an EOF is overridden by a user-generated scan error.
func TestErrAtEOF(t *testing.T) {
s := NewScanner(strings.NewReader("1 2 33"))
// This spitter will fail on last entry, after s.err==EOF.
// This splitter will fail on last entry, after s.err==EOF.
split := func(data []byte, atEOF bool) (advance int, token []byte, err error) {
advance, token, err = ScanWords(data, atEOF)
if len(token) > 1 {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/asm/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The GOOS and GOARCH environment variables set the desired target.
Flags:
-D value
predefined symbol with optional simple value -D=identifer=value;
predefined symbol with optional simple value -D=identifier=value;
can be set multiple times
-I value
include directory; can be set multiple times
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/asm/internal/asm/testdata/arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ again:
//
// LSTXR reg ',' addr ',' reg
// {
// outtcode($1, &$2, &$4, &$6);
// outcode($1, &$2, &$4, &$6);
// }
LDAXRW (R0), R2
STLXRW R1, (R0), R3
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/asm/internal/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
TrimPath = flag.String("trimpath", "", "remove prefix from recorded source file paths")
Shared = flag.Bool("shared", false, "generate code that can be linked into a shared library")
Dynlink = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
AllErrors = flag.Bool("e", false, "no limit on number of errors reported")
AllErrors = flag.Bool("e", false, "no limit on number of errors reported")
)

var (
Expand All @@ -29,7 +29,7 @@ var (
)

func init() {
flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifer=value; can be set multiple times")
flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifier=value; can be set multiple times")
flag.Var(&I, "I", "include directory; can be set multiple times")
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/amd64/peep.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ func elimshortmov(g *gc.Graph) {
}

if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST {
// move or artihmetic into partial register.
// move or arithmetic into partial register.
// from another register or constant can be movl.
// we don't switch to 64-bit arithmetic if it can
// change how the carry bit is set (and the carry bit is needed).
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/arm64/ggen.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func dodiv(op gc.Op, nl *gc.Node, nr *gc.Node, res *gc.Node) {
// The hardware will generate undefined result.
// Also need to explicitly trap on division on zero,
// the hardware will silently generate undefined result.
// DIVW will leave unpredicable result in higher 32-bit,
// DIVW will leave unpredictable result in higher 32-bit,
// so always use DIVD/DIVDU.
t := nl.Type

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/bexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ amount of space to hold the list without the need to grow it later.
All integer values use a variable-length encoding for compact representation.
If debugFormat is set, each integer and string value is preceeded by a marker
If debugFormat is set, each integer and string value is preceded by a marker
and position information in the encoding. This mechanism permits an importer
to recognize immediately when it is out of sync. The importer recognizes this
mode automatically (i.e., it can import export data produced with debugging
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/mparith3.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"math"
)

/// implements float arihmetic
// implements float arithmetic

func newMpflt() *Mpflt {
var a Mpflt
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func ordercall(n *Node, order *Order) {

// Ordermapassign appends n to order->out, introducing temporaries
// to make sure that all map assignments have the form m[k] = x,
// where x is adressable.
// where x is addressable.
// (Orderexpr has already been called on n, so we know k is addressable.)
//
// If n is m[k] = x where x is not addressable, the rewrite is:
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/plive.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func addedge(from *BasicBlock, to *BasicBlock) {
}

// Inserts prev before curr in the instruction
// stream. Any control flow, such as branches or fall throughs, that target the
// stream. Any control flow, such as branches or fall-throughs, that target the
// existing instruction are adjusted to target the new instruction.
func splicebefore(lv *Liveness, bb *BasicBlock, prev *obj.Prog, curr *obj.Prog) {
// There may be other instructions pointing at curr,
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ func dalgsym(t *Type) *Sym {
// be multiples of four words. On 32-bit systems that's 16 bytes, and
// all size classes >= 16 bytes are 16-byte aligned, so no real constraint.
// On 64-bit systems, that's 32 bytes, and 32-byte alignment is guaranteed
// for size classes >= 256 bytes. On a 64-bit sytem, 256 bytes allocated
// for size classes >= 256 bytes. On a 64-bit system, 256 bytes allocated
// is 32 pointers, the bits for which fit in 4 bytes. So maxPtrmaskBytes
// must be >= 4.
//
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ppc64/ggen.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func dodiv(op gc.Op, nl *gc.Node, nr *gc.Node, res *gc.Node) {
// The hardware will generate undefined result.
// Also need to explicitly trap on division on zero,
// the hardware will silently generate undefined result.
// DIVW will leave unpredicable result in higher 32-bit,
// DIVW will leave unpredictable result in higher 32-bit,
// so always use DIVD/DIVDU.
t := nl.Type

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/x86/peep.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func elimshortmov(g *gc.Graph) {
}

if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST {
// move or artihmetic into partial register.
// move or arithmetic into partial register.
// from another register or constant can be movl.
// we don't switch to 32-bit arithmetic if it can
// change how the carry bit is set (and the carry bit is needed).
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/dist/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ func defaulttarg() string {
fatal("current directory %s is not under %s", pwd, real_src)
}
pwd = pwd[len(real_src):]
// guard againt xrealwd return the directory without the trailing /
// guard against xrealwd returning the directory without the trailing /
pwd = strings.TrimPrefix(pwd, "/")

return pwd
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ func TestIssue7108(t *testing.T) {
// cmd/go: go test -a foo does not rebuild regexp.
func TestIssue6844(t *testing.T) {
if testing.Short() {
t.Skip("don't rebuild the standard libary in short mode")
t.Skip("don't rebuild the standard library in short mode")
}

tg := testgo(t)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ var isGoRelease = strings.HasPrefix(runtime.Version(), "go1")
// an explicit data comparison. Specifically, we build a list of the
// inputs to the build, compute its SHA1 hash, and record that as the
// ``build ID'' in the generated object. At the next build, we can
// recompute the buid ID and compare it to the one in the generated
// recompute the build ID and compare it to the one in the generated
// object. If they differ, the list of inputs has changed, so the object
// is out of date and must be rebuilt.
//
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/arm/obj5.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
}
}

// Replace TLS register fetches on older ARM procesors.
// Replace TLS register fetches on older ARM processors.
switch p.As {
// Treat MRC 15, 0, <reg>, C13, C0, 3 specially.
case AMRC:
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/mips/obj0.go
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ func markregused(ctxt *obj.Link, s *Sch) {
}

/*
* test to see if 2 instrictions can be
* test to see if two instructions can be
* interchanged without changing semantics
*/
func depend(ctxt *obj.Link, sa, sb *Sch) bool {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/x86/obj6.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
}
}

// Rewrite 0 to $0 in 3rd argment to CMPPS etc.
// Rewrite 0 to $0 in 3rd argument to CMPPS etc.
// That's what the tables expect.
switch p.As {
case ACMPPD, ACMPPS, ACMPSD, ACMPSS:
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/arm/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func gentext() {
}

// Preserve highest 8 bits of a, and do addition to lower 24-bit
// of a and b; used to adjust ARM branch intruction's target
// of a and b; used to adjust ARM branch instruction's target
func braddoff(a int32, b int32) int32 {
return int32((uint32(a))&0xff000000 | 0x00ffffff&uint32(a+b))
}
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/arm/obj.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func archinit() {
}

case obj.Hdarwin: /* apple MACH */
ld.Debug['w'] = 1 // disable DWARF generataion
ld.Debug['w'] = 1 // disable DWARF generation
ld.Machoinit()
ld.HEADR = ld.INITIAL_MACHO_HEADR
if ld.INITTEXT == -1 {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/arm64/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func machoreloc1(r *ld.Reloc, sectoff int64) int {
rs := r.Xsym

// ld64 has a bug handling MACHO_ARM64_RELOC_UNSIGNED with !extern relocation.
// see cmd/internal/ld/data.go for details. The workarond is that don't use !extern
// see cmd/internal/ld/data.go for details. The workaround is that don't use !extern
// UNSIGNED relocation at all.
if rs.Type == obj.SHOSTOBJ || r.Type == obj.R_CALLARM64 || r.Type == obj.R_ADDRARM64 || r.Type == obj.R_ADDR {
if rs.Dynid < 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/ld/dwarf_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const (
DW_CHILDREN_yes = 0x01
)

// Not from the spec, but logicaly belongs here
// Not from the spec, but logically belongs here
const (
DW_CLS_ADDRESS = 0x01 + iota
DW_CLS_BLOCK
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/link/internal/ld/ldelf.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,9 @@ func readelfsym(elfobj *ElfObj, i int, sym *ElfSym, needSym int) (err error) {
}

if needSym != 0 {
// local names and hidden visiblity global names are unique
// and should only reference by its index, not name, so we
// don't bother to add them into hash table
// local names and hidden global names are unique
// and should only be referenced by their index, not name, so we
// don't bother to add them into the hash table
s = linknewsym(Ctxt, sym.name, Ctxt.Version)

s.Type |= obj.SHIDDEN
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/ld/macho.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ func Asmbmacho() {
if Linkmode == LinkInternal {
// For lldb, must say LC_VERSION_MIN_MACOSX or else
// it won't know that this Mach-O binary is from OS X
// (could be iOS or WatchOS intead).
// (could be iOS or WatchOS instead).
// Go on iOS uses linkmode=external, and linkmode=external
// adds this itself. So we only need this code for linkmode=internal
// and we can assume OS X.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/pprof/internal/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ const (
addressOrder
)

// sort reoders the entries in a report based on the specified
// sort reorders the entries in a report based on the specified
// ordering criteria. The result is sorted in decreasing order for
// numeric quantities, alphabetically for text, and increasing for
// addresses.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/pprof/internal/report/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func getMissingFunctionSource(filename string, asm map[int]nodes, start, end int
return fnodes, filename
}

// adjustSourcePath adjusts the pathe for a source file by trimmming
// adjustSourcePath adjusts the path for a source file by trimming
// known prefixes and searching for the file on all parents of the
// current working dir.
func adjustSourcePath(path string) (*os.File, string, error) {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/ecdsa/ecdsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func testNonceSafety(t *testing.T, c elliptic.Curve, tag string) {
}

if r0.Cmp(r1) == 0 {
t.Errorf("%s: the nonce used for two diferent messages was the same", tag)
t.Errorf("%s: the nonce used for two different messages was the same", tag)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/md5/md5block_arm.s
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ loop:
BEQ aligned // aligned detected - skip copy

// Copy the unaligned source data into the aligned temporary buffer
// memove(to=4(R13), from=8(R13), n=12(R13)) - Corrupts all registers
// memmove(to=4(R13), from=8(R13), n=12(R13)) - Corrupts all registers
MOVW $buf, Rtable // to
MOVW $64, Rc0 // n
MOVM.IB [Rtable,Rdata,Rc0], (R13)
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tls/handshake_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func TestClientResumption(t *testing.T) {
t.Fatalf("%s resumed: %v, expected: %v", test, hs.DidResume, didResume)
}
if didResume && (hs.PeerCertificates == nil || hs.VerifiedChains == nil) {
t.Fatalf("expected non-nil certificates after resumption. Got peerCertificates: %#v, verifedCertificates: %#v", hs.PeerCertificates, hs.VerifiedChains)
t.Fatalf("expected non-nil certificates after resumption. Got peerCertificates: %#v, verifiedCertificates: %#v", hs.PeerCertificates, hs.VerifiedChains)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/x509/root_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ func TestSystemRoots(t *testing.T) {
}

if have < want {
t.Errorf("insufficent overlap between cgo and non-cgo roots; want at least %d, have %d", want, have)
t.Errorf("insufficient overlap between cgo and non-cgo roots; want at least %d, have %d", want, have)
}
}
2 changes: 1 addition & 1 deletion src/database/sql/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ func TestStmtCloseOrder(t *testing.T) {

_, err := db.Query("SELECT|non_existent|name|")
if err == nil {
t.Fatal("Quering non-existent table should fail")
t.Fatal("Querying non-existent table should fail")
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/debug/dwarf/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ type Field struct {
Class Class
}

// A Class is the DWARF 4 class of an attibute value.
// A Class is the DWARF 4 class of an attribute value.
//
// In general, a given attribute's value may take on one of several
// possible classes defined by DWARF, each of which leads to a
Expand Down
2 changes: 1 addition & 1 deletion src/encoding/base32/base32_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func TestDecodeCorrupt(t *testing.T) {
_, err := StdEncoding.Decode(dbuf, []byte(tc.input))
if tc.offset == -1 {
if err != nil {
t.Error("Decoder wrongly detected coruption in", tc.input)
t.Error("Decoder wrongly detected corruption in", tc.input)
}
continue
}
Expand Down
2 changes: 1 addition & 1 deletion src/encoding/base64/base64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func TestDecodeCorrupt(t *testing.T) {
_, err := StdEncoding.Decode(dbuf, []byte(tc.input))
if tc.offset == -1 {
if err != nil {
t.Error("Decoder wrongly detected coruption in", tc.input)
t.Error("Decoder wrongly detected corruption in", tc.input)
}
continue
}
Expand Down
4 changes: 2 additions & 2 deletions src/encoding/json/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func BenchmarkCodeUnmarshal(b *testing.B) {
for i := 0; i < b.N; i++ {
var r codeResponse
if err := Unmarshal(codeJSON, &r); err != nil {
b.Fatal("Unmmarshal:", err)
b.Fatal("Unmarshal:", err)
}
}
b.SetBytes(int64(len(codeJSON)))
Expand All @@ -173,7 +173,7 @@ func BenchmarkCodeUnmarshalReuse(b *testing.B) {
var r codeResponse
for i := 0; i < b.N; i++ {
if err := Unmarshal(codeJSON, &r); err != nil {
b.Fatal("Unmmarshal:", err)
b.Fatal("Unmarshal:", err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/go/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ func (ctxt *Context) saveCgo(filename string, di *Package, cg *ast.CommentGroup)
// the result is safe for the shell.
func expandSrcDir(str string, srcdir string) (string, bool) {
// "\" delimited paths cause safeCgoName to fail
// so convert native paths with a different delimeter
// so convert native paths with a different delimiter
// to "/" before starting (eg: on windows).
srcdir = filepath.ToSlash(srcdir)

Expand Down
8 changes: 4 additions & 4 deletions src/go/build/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ func TestShouldBuild(t *testing.T) {
t.Errorf("shouldBuild(file1) = false, want true")
}
if !reflect.DeepEqual(m, want1) {
t.Errorf("shoudBuild(file1) tags = %v, want %v", m, want1)
t.Errorf("shouldBuild(file1) tags = %v, want %v", m, want1)
}

m = map[string]bool{}
if ctx.shouldBuild([]byte(file2), m) {
t.Errorf("shouldBuild(file2) = true, want fakse")
t.Errorf("shouldBuild(file2) = true, want false")
}
if !reflect.DeepEqual(m, want2) {
t.Errorf("shoudBuild(file2) tags = %v, want %v", m, want2)
t.Errorf("shouldBuild(file2) tags = %v, want %v", m, want2)
}

m = map[string]bool{}
Expand All @@ -172,7 +172,7 @@ func TestShouldBuild(t *testing.T) {
t.Errorf("shouldBuild(file3) = false, want true")
}
if !reflect.DeepEqual(m, want3) {
t.Errorf("shoudBuild(file3) tags = %v, want %v", m, want3)
t.Errorf("shouldBuild(file3) tags = %v, want %v", m, want3)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/go/internal/gcimporter/gcimporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func (p *parser) parseMapType(parent *types.Package) types.Type {
// For qualified names, the returned package is nil (and not created if
// it doesn't exist yet) unless materializePkg is set (which creates an
// unnamed package with valid package path). In the latter case, a
// subequent import clause is expected to provide a name for the package.
// subsequent import clause is expected to provide a name for the package.
//
func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) {
pkg = parent
Expand Down
Loading

0 comments on commit fdd0179

Please sign in to comment.