]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: fix typos and spelling
authorMartin Möhrmann <martisch@uos.de>
Wed, 24 Feb 2016 10:55:20 +0000 (11:55 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 Feb 2016 18:42:29 +0000 (18:42 +0000)
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>

92 files changed:
src/bufio/bufio.go
src/bufio/scan_test.go
src/cmd/asm/doc.go
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/flags/flags.go
src/cmd/compile/internal/amd64/peep.go
src/cmd/compile/internal/arm64/ggen.go
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/mparith3.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/plive.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/ppc64/ggen.go
src/cmd/compile/internal/x86/peep.go
src/cmd/dist/build.go
src/cmd/go/go_test.go
src/cmd/go/pkg.go
src/cmd/internal/obj/arm/obj5.go
src/cmd/internal/obj/mips/obj0.go
src/cmd/internal/obj/x86/obj6.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/arm/obj.go
src/cmd/link/internal/arm64/asm.go
src/cmd/link/internal/ld/dwarf_defs.go
src/cmd/link/internal/ld/ldelf.go
src/cmd/link/internal/ld/macho.go
src/cmd/pprof/internal/report/report.go
src/cmd/pprof/internal/report/source.go
src/crypto/ecdsa/ecdsa_test.go
src/crypto/md5/md5block_arm.s
src/crypto/tls/handshake_client_test.go
src/crypto/x509/root_darwin_test.go
src/database/sql/sql_test.go
src/debug/dwarf/entry.go
src/encoding/base32/base32_test.go
src/encoding/base64/base64_test.go
src/encoding/json/bench_test.go
src/go/build/build.go
src/go/build/build_test.go
src/go/internal/gcimporter/gcimporter.go
src/go/types/builtins.go
src/go/types/testdata/const0.src
src/html/template/template_test.go
src/image/gif/reader.go
src/internal/syscall/windows/registry/registry_test.go
src/math/big/float.go
src/math/big/floatconv.go
src/net/dnsclient.go
src/net/dnsclient_unix_test.go
src/net/http/client_test.go
src/net/http/cookie.go
src/net/http/h2_bundle.go
src/net/http/httptest/server_test.go
src/net/http/request.go
src/net/http/request_test.go
src/net/http/requestwrite_test.go
src/net/http/server.go
src/net/http/transport.go
src/net/http/transport_test.go
src/net/interface_bsd.go
src/net/interface_darwin.go
src/net/interface_freebsd.go
src/net/interface_test.go
src/net/interface_unix_test.go
src/net/ip_test.go
src/net/ipsock_posix.go
src/net/listen_test.go
src/net/net_windows_test.go
src/net/sendfile_windows.go
src/net/udpsock_test.go
src/os/exec/exec_test.go
src/os/exec/lp_windows_test.go
src/os/os_test.go
src/os/str.go
src/os/user/lookup_windows.go
src/path/filepath/path_windows.go
src/reflect/all_test.go
src/regexp/exec_test.go
src/runtime/asm_arm.s
src/runtime/cgo/callbacks.go
src/runtime/chan_test.go
src/runtime/memclr_amd64.s
src/runtime/memmove_ppc64x.s
src/runtime/mgcwork.go
src/runtime/netpoll_solaris.go
src/runtime/proc.go
src/runtime/runtime_test.go
src/runtime/softfloat_arm.go
src/runtime/sys_solaris_amd64.s
src/sort/sort_test.go
src/syscall/route_bsd.go
src/text/template/multi_test.go

index 6a70f7034d043142c30f27a19d56bb28d6113b2a..33470ccd416da567def80dea6f93a9c5c102e602 100644 (file)
@@ -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 {
index 07b1a56dc0a4654a294b5085c5a6a6aad15e5831..d64d0b45d7346aad071ed68708b0ec2780ebe9d1 100644 (file)
@@ -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 {
index a9c8bfb7dbc3dbb099361df567a4c4e937b03e92..aa621479579aa1acd572b8678f022349f8d9c6d1 100644 (file)
@@ -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
index 22d430631cf06735174a1d28a972038a18366856..6466da7190542ca631a70f882000c012da394127 100644 (file)
@@ -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
index fd42e8443b5ab8d9ee1ae5eb49f15b1884afb2c9..4557c2a7f9edf366eb59a3829da8b2ef33a53c05 100644 (file)
@@ -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 (
@@ -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")
 }
 
index 452f954bd828c881e64adf082527543c89588559..810214504fac1782c96a4e510289707dfc214902 100644 (file)
@@ -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).
index c495bbc77f9376234386cca59ebbc55df9f82582..99ffd5acd56d6a466aa30316b0dcc59e7991b0c1 100644 (file)
@@ -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
 
index ff0465f64cb49431f5559935ae6adac11a05f1be..dc55bb023ed6a39c9b11f13ba7c9d8331db31ca8 100644 (file)
@@ -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
index 9bcfda7c0d7676743528a15449f4c8727f15112e..5b61a9e17fd32aa3f1840a316d7c4c9b93da8b81 100644 (file)
@@ -11,7 +11,7 @@ import (
        "math"
 )
 
-/// implements float arihmetic
+// implements float arithmetic
 
 func newMpflt() *Mpflt {
        var a Mpflt
index ddd6cb97193524ecdf86759a72f7900584199718..a3a8441f505cccf700c4a3ef2ff20a5e9b281401 100644 (file)
@@ -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:
index feb66f625a550dfd88bac3edc829de2b8b7ca48f..8719029c914019d3083b76dd12514e62d3a8555f 100644 (file)
@@ -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,
index 04e94f18eb5ec94af614352c7a66dc989ef569ca..d2f00d0a054b5126359cb647170105277e58873d 100644 (file)
@@ -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.
 //
index 28fcecf8f4b338d103d83290dee414965a06b727..00fcdb8443ee58313d3d73c3cb387f6cdd0910d7 100644 (file)
@@ -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
 
index 63e64cb77c057f9dd40b9cbe1e82514132336e0f..239e9cc35f9f45ede7916e70c791eac0f809f8ac 100644 (file)
@@ -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).
index 1b3df333d602a19d6509e9af1df229933d32f32a..0b2ce271dc75ea652dc3c49202f2e7d3af9801db 100644 (file)
@@ -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
index 51931769d5a51aeb9947e643ac8f6650b5d0b93b..b43a786727f07bf7008dfbc56aa6254111416add 100644 (file)
@@ -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)
index f9988bf2d78319bd9cab15672781db06adb28a95..ccff783c291b57d8c165586dbab87a4b924a5b48 100644 (file)
@@ -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.
 //
index 1a51dc3b88eb518d8a0f46f06bd04ed0beb02026..c5af929b14e8073c7b26126c0dbfade932d6d0da 100644 (file)
@@ -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:
index a3ccad2764f7f781ac8b4f56adf3bf5f59d2d50a..fccff707be39095d87c3e7fa611717322e9fc428 100644 (file)
@@ -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 {
index 55ddfe108c8310c46a118697f963b4742e26f9b1..6332b7e4d9f0bd03acc5b14e5d6ea1ec2a319dcc 100644 (file)
@@ -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:
index 74c22497029d4af3c29b7fc86ff9907bbb3c065f..ca5551257559afd6b491ba79841d0bd01dd7db29 100644 (file)
@@ -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))
 }
index 10eb723bb9379d46c2eb5266c80e1b29745d6eaa..29a58c6fd27083d57e63dc768b2081d8829ff5bc 100644 (file)
@@ -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 {
index 0e5a2d0a63cdf26c51f854c0570c4fa987fb54c3..be8afa5d26899bb408ef967b4ef6bbcbc3222756 100644 (file)
@@ -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 {
index 61389d9218c8a9c9b4b6bb838d98ffa1df21ea9a..c52879cbbe5d930a576c004cc84e6ff4af51da3d 100644 (file)
@@ -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
index bea3f2dcc3bbaf0b8b9845b265faf8bc433f3aaa..9eeca218d3edc2955e375b2246a279beedb2ae7f 100644 (file)
@@ -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
index 1c7f3a0d824cd93f35e7e9b7456854c5105f4467..010e7da0eedfde61412780dd7772c0638b8bd715 100644 (file)
@@ -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.
index 0265e2384cb4cb25bde3e58e679f0bc7d65a20b9..b6694f559ff392bc028160c59ba1ef67e8c08b5f 100644 (file)
@@ -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.
index 73ae1b4ea2efadf747beab8629dff90cd7a72acc..908be21424f3cd95af306dfeae955ed74f2fa32f 100644 (file)
@@ -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) {
index 62a3fcc49641349a5f99ee4b30cf137d652aa0c4..5e588b92582bbc18e1cfd27b461491c6270955e6 100644 (file)
@@ -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)
        }
 }
 
index f1f0f67e5556aae843890eb4bcdd2ea85e6a9802..54d02b743a6a2b293b2e5de72d9cc0aedadc4291 100644 (file)
@@ -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)
index f78cc4693550f504e55422d7611dce3e097bca46..9598d2feae382dce894ff56db9a53432a6dd6927 100644 (file)
@@ -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)
                }
        }
 
index cc6d23c505583913c0e0c2d4f7d7ccad36151981..8b6b1516ae7008c794c3242d45306243c74c71a5 100644 (file)
@@ -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)
        }
 }
index 8ec70d99b02c5374b5e1de8177bc59096f3ff0e5..68f17fb6b00f4bf4fb51ac53d00df44c63e95fea 100644 (file)
@@ -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")
        }
 }
 
index 5ca86679fa5116a3cd5122921b539fc209714f12..6b140c60c79b46408fae9c5e3afdbd1ad5984e97 100644 (file)
@@ -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
index 5a68f06e1c94bc12e86fb2f91035fe3c1b3d4435..66a48a3f6f74d285de2d524b4b2ca18044d52011 100644 (file)
@@ -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
                }
index fc6a1ea654f75cae6721a366af336dd80f54f105..eebf113212a17122a188623dc13adbd861f2b80d 100644 (file)
@@ -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
                }
index ed89d1156eda8ef31a9ce243974acf1e987e1159..8a514e58cd08f462f49bd34caf9ccdee3b088a27 100644 (file)
@@ -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)))
@@ -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)
                }
        }
 }
index 0835c1e3c04d13ba49639a3bbec0607fbd7504d6..d3b83b9f4687eb398138a8baf1f87e79d6d25899 100644 (file)
@@ -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)
 
index 7312af08b57b14752dea88862d476dafa46041f7..9a473f41ec1850336f0f4de54c3e4c2d5f6be204 100644 (file)
@@ -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{}
@@ -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)
        }
 }
 
index 052277f4fe89acec47e2129ae83c495e03c944e1..b2848c3023696af3ccb8b4b3dd6ff09aa6369f32 100644 (file)
@@ -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
index 803264fb585de442fd1f843b41aa6b78d88ada62..0082be9e2e95fd266679496cbe1d3f87035646f4 100644 (file)
@@ -366,7 +366,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b
                        } else {
                                // an untyped non-constant argument may appear if
                                // it contains a (yet untyped non-constant) shift
-                               // epression: convert it to complex128 which will
+                               // expression: convert it to complex128 which will
                                // result in an error (shift of complex value)
                                check.convertUntyped(x, Typ[Complex128])
                                // x should be invalid now, but be conservative and check
index 716a5907ce3290d3e4d57449e00e0c192392d3d3..a61717887e02c732b340e35bcf86fc26990dcb67 100644 (file)
@@ -239,7 +239,7 @@ const (
 
 type A [iota /* ERROR "cannot use iota" */ ]int
 
-// constant expressions with operands accross different
+// constant expressions with operands across different
 // constant declarations must use the right iota values
 const (
        _c0 = iota
index 6f70d67de92595c83ec175bb0d02e177c9b8d63a..46df1f8d49562d3bc0057d9b827cff8c85e7e395 100644 (file)
@@ -13,7 +13,7 @@ func TestTemplateClone(t *testing.T) {
                t.Fatal(err)
        }
        if len(clone.Templates()) != len(orig.Templates()) {
-               t.Fatalf("Invalid lenth of t.Clone().Templates()")
+               t.Fatalf("Invalid length of t.Clone().Templates()")
        }
 
        const want = "stuff"
index 6a133124ad5bcb522d2266d2dfb52851920a0540..72b52e36e5764f796d19ad3652074417c719629c 100644 (file)
@@ -210,7 +210,7 @@ func (d *decoder) decode(r io.Reader, configOnly bool) error {
                        // for an image". In practice, though, giflib (a widely used C
                        // library) does not enforce this, so we also accept lzwr returning
                        // io.ErrUnexpectedEOF (meaning that the encoded stream hit io.EOF
-                       // before the LZW decoder saw an explict end code), provided that
+                       // before the LZW decoder saw an explicit end code), provided that
                        // the io.ReadFull call above successfully read len(m.Pix) bytes.
                        // See https://golang.org/issue/9856 for an example GIF.
                        if n, err := lzwr.Read(d.tmp[:1]); n != 0 || (err != io.EOF && err != io.ErrUnexpectedEOF) {
index a63c42022d159488e33c44dc6ae21c15b04f02ed..56069d7684d2880f471fb5d7f5f5c3dcb8defec3 100644 (file)
@@ -213,7 +213,7 @@ func enumerateValues(t *testing.T, k registry.Key) {
                }
        }
        for n, v := range haveNames {
-               t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v)
+               t.Errorf("value %s (%v) is found while enumerating, but has not been created", n, v)
        }
 }
 
@@ -335,7 +335,7 @@ func testGetValue(t *testing.T, k registry.Key, test ValueTest, size int) {
        // read data with short buffer
        gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size-1))
        if err == nil {
-               t.Errorf("GetValue(%s, [%d]byte) should fail, but suceeded", test.Name, size-1)
+               t.Errorf("GetValue(%s, [%d]byte) should fail, but succeeded", test.Name, size-1)
                return
        }
        if err != registry.ErrShortBuffer {
index b1c748c9a54daea4ec257f7f1056af0d488b1517..6460620bdeaf472d02fda546d7b77faf53f9097f 100644 (file)
@@ -1427,7 +1427,7 @@ func (z *Float) Add(x, y *Float) *Float {
        }
 
        if x.form == finite && y.form == finite {
-               // x + y (commom case)
+               // x + y (common case)
                z.neg = x.neg
                if x.neg == y.neg {
                        // x + y == x + y
index 37d5c06a6f33d6b132c665e7e17b55e28b6b6dea..a884df6fe1c4a27890d14f7da10b9ffb4bf9a274 100644 (file)
@@ -85,7 +85,7 @@ func (z *Float) scan(r io.ByteScanner, base int) (f *Float, b int, err error) {
        if fcount < 0 {
                // The mantissa has a "decimal" point ddd.dddd; and
                // -fcount is the number of digits to the right of '.'.
-               // Adjust relevant exponent accodingly.
+               // Adjust relevant exponent accordingly.
                d := int64(fcount)
                switch b {
                case 10:
index 5dc2a0368ceeb242593f306884a1ba25a94aecb4..5094ac4f1b790a64c342b6bb37225b83c3ac3d15 100644 (file)
@@ -161,7 +161,7 @@ func isDomainName(s string) bool {
        return ok
 }
 
-// absDomainName returns an absoulte domain name which ends with a
+// absDomainName returns an absolute domain name which ends with a
 // trailing dot to match pure Go reverse resolver and all other lookup
 // routines.
 // See golang.org/issue/12189.
index d7f00c784d55ccefd725ccbf38877c0235a2a184..5623039b7b87dd4efb4c77c36d24293b9decfebb 100644 (file)
@@ -67,7 +67,7 @@ var specialDomainNameTests = []struct {
 
        // Name resolution APIs and libraries should recognize the
        // followings as special and should not send any queries.
-       // Though, we test those names here for verifying nagative
+       // Though, we test those names here for verifying negative
        // answers at DNS query-response interaction level.
        {"localhost.", dnsTypeALL, dnsRcodeNameError},
        {"invalid.", dnsTypeALL, dnsRcodeNameError},
@@ -398,7 +398,7 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) {
        for _, order := range []hostLookupOrder{hostLookupFilesDNS, hostLookupDNSFiles} {
                name := fmt.Sprintf("order %v", order)
 
-               // First ensure that we get an error when contacting a non-existant host.
+               // First ensure that we get an error when contacting a non-existent host.
                _, err := goLookupIPOrder("notarealhost", order)
                if err == nil {
                        t.Errorf("%s: expected error while looking up name not in hosts file", name)
index 8939dc8baf9cc9ac4e95784fac3ca897543c5f4b..e4fed2680327a12419895ac820064d30df55fe8c 100644 (file)
@@ -273,7 +273,7 @@ func TestClientRedirects(t *testing.T) {
                t.Fatal("didn't see redirect")
        }
        if lastReq.Cancel != cancel {
-               t.Errorf("expected lastReq to have the cancel channel set on the inital req")
+               t.Errorf("expected lastReq to have the cancel channel set on the initial req")
        }
 
        checkErr = errors.New("no redirects allowed")
index 648709dd99780d37cae44b417fed9bc3983bdc50..1ea0e9397a37ec41042931a3a480d081334ff470 100644 (file)
@@ -223,7 +223,7 @@ func readCookies(h Header, filter string) []*Cookie {
        return cookies
 }
 
-// validCookieDomain returns wheter v is a valid cookie domain-value.
+// validCookieDomain returns whether v is a valid cookie domain-value.
 func validCookieDomain(v string) bool {
        if isCookieDomainName(v) {
                return true
index 4e19b3e71f7d33ca7a9b5e3a594efd203931ae1e..f778acb2b5dfd2987f2456726ce8f82b7b8f28d7 100644 (file)
@@ -288,7 +288,7 @@ func http2configureTransport(t1 *Transport) (*http2Transport, error) {
 }
 
 // registerHTTPSProtocol calls Transport.RegisterProtocol but
-// convering panics into errors.
+// converting panics into errors.
 func http2registerHTTPSProtocol(t *Transport, rt RoundTripper) (err error) {
        defer func() {
                if e := recover(); e != nil {
@@ -1410,7 +1410,7 @@ type http2PriorityFrame struct {
        http2PriorityParam
 }
 
-// PriorityParam are the stream prioritzation parameters.
+// PriorityParam are the stream prioritization parameters.
 type http2PriorityParam struct {
        // StreamDep is a 31-bit stream identifier for the
        // stream that this stream depends on. Zero means no
@@ -2850,7 +2850,7 @@ type http2stream struct {
        weight           uint8
        state            http2streamState
        sentReset        bool // only true once detached from streams map
-       gotReset         bool // only true once detacted from streams map
+       gotReset         bool // only true once detached from streams map
        gotTrailerHeader bool // HEADER frame for trailers was seen
 
        trailer    Header // accumulated trailers
@@ -4391,7 +4391,7 @@ const http2TrailerPrefix = "Trailer:"
 // trailers. That worked for a while, until we found the first major
 // user of Trailers in the wild: gRPC (using them only over http2),
 // and gRPC libraries permit setting trailers mid-stream without
-// predeclarnig them. So: change of plans. We still permit the old
+// predeclaring them. So: change of plans. We still permit the old
 // way, but we also permit this hack: if a Header() key begins with
 // "Trailer:", the suffix of that key is a Trailer. Because ':' is an
 // invalid token byte anyway, there is no ambiguity. (And it's already
@@ -4605,7 +4605,7 @@ type http2Transport struct {
        // send in the initial settings frame. It is how many bytes
        // of response headers are allow. Unlike the http2 spec, zero here
        // means to use a default limit (currently 10MB). If you actually
-       // want to advertise an ulimited value to the peer, Transport
+       // want to advertise an unlimited value to the peer, Transport
        // interprets the highest possible value here (0xffffffff or 1<<32-1)
        // to mean no limit.
        MaxHeaderListSize uint32
@@ -5012,7 +5012,7 @@ const http2maxAllocFrameSize = 512 << 10
 // frameBuffer returns a scratch buffer suitable for writing DATA frames.
 // They're capped at the min of the peer's max frame size or 512KB
 // (kinda arbitrarily), but definitely capped so we don't allocate 4GB
-// bufers.
+// buffers.
 func (cc *http2ClientConn) frameScratchBuffer() []byte {
        cc.mu.Lock()
        size := cc.maxFrameSize
@@ -6544,7 +6544,7 @@ func (ws *http2writeScheduler) take() (wm http2frameWriteMsg, ok bool) {
        return ws.takeFrom(q.streamID(), q)
 }
 
-// zeroCanSend is defered from take.
+// zeroCanSend is deferred from take.
 func (ws *http2writeScheduler) zeroCanSend() {
        for i := range ws.canSend {
                ws.canSend[i] = nil
index c9606f24198d1cf7b5af67b6495494572b483fd4..61470c382283d0da966a129b3a30d7fb26398201 100644 (file)
@@ -53,7 +53,7 @@ func TestGetAfterClose(t *testing.T) {
        res, err = http.Get(ts.URL)
        if err == nil {
                body, _ := ioutil.ReadAll(res.Body)
-               t.Fatalf("Unexected response after close: %v, %v, %s", res.Status, res.Header, body)
+               t.Fatalf("Unexpected response after close: %v, %v, %s", res.Status, res.Header, body)
        }
 }
 
index 8cdab02af5a057ca0382fcb17034a4086547a421..c3e43bb99da3f11d796b672eed7bfaf5208da105 100644 (file)
@@ -521,7 +521,7 @@ func cleanHost(in string) string {
        return in
 }
 
-// removeZone removes IPv6 zone identifer from host.
+// removeZone removes IPv6 zone identifier from host.
 // E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080"
 func removeZone(host string) string {
        if !strings.HasPrefix(host, "[") {
index 0ecdf85a5639a0bac57dbc8f433c8474024d8589..3d215ff5380bf499e1883594620dd84cc4b105c5 100644 (file)
@@ -99,7 +99,7 @@ type parseContentTypeTest struct {
 
 var parseContentTypeTests = []parseContentTypeTest{
        {false, stringMap{"Content-Type": {"text/plain"}}},
-       // Empty content type is legal - shoult be treated as
+       // Empty content type is legal - should be treated as
        // application/octet-stream (RFC 2616, section 7.2.1)
        {false, stringMap{}},
        {true, stringMap{"Content-Type": {"text/plain; boundary="}}},
index cfb95b0a800aaef72998b24383585f427d3fb1e7..9b70fcbf8aaefb3c957239b6ea0407401a462bcc 100644 (file)
@@ -573,7 +573,7 @@ func TestRequestWriteClosesBody(t *testing.T) {
                "Transfer-Encoding: chunked\r\n\r\n" +
                // TODO: currently we don't buffer before chunking, so we get a
                // single "m" chunk before the other chunks, as this was the 1-byte
-               // read from our MultiReader where we stiched the Body back together
+               // read from our MultiReader where we stitched the Body back together
                // after sniffing whether the Body was 0 bytes or not.
                chunk("m") +
                chunk("y body") +
index e2d8d277e0418b7b1c34183c8c7e22bc5aa559d1..773dd59c6bf8c19f466023a65d6a17411f844f2f 100644 (file)
@@ -1374,7 +1374,7 @@ func (c *conn) setState(nc net.Conn, state ConnState) {
 
 // badRequestError is a literal string (used by in the server in HTML,
 // unescaped) to tell the user why their request was bad. It should
-// be plain text without user info or other embeddded errors.
+// be plain text without user info or other embedded errors.
 type badRequestError string
 
 func (e badRequestError) Error() string { return "Bad Request: " + string(e) }
index 03e9162b14f61d0ec6d53dab0c57b322758da4ba..f622f6f9834b3e4c6f76be46175da879d80bdcb6 100644 (file)
@@ -982,7 +982,7 @@ func (k connectMethodKey) String() string {
 // (but may be used for non-keep-alive requests as well)
 type persistConn struct {
        // alt optionally specifies the TLS NextProto RoundTripper.
-       // This is used for HTTP/2 today and future protocol laters.
+       // This is used for HTTP/2 today and future protocols later.
        // If it's non-nil, the rest of the fields are unused.
        alt RoundTripper
 
index d9da078fa0098f5c1d2513874710c221e73edbb3..e8a4623556806e4ac9a5f1b4ded2eadc60c21bff 100644 (file)
@@ -853,7 +853,7 @@ func TestTransportExpect100Continue(t *testing.T) {
                {path: "/100", body: []byte("hello"), sent: 5, status: 200},       // Got 100 followed by 200, entire body is sent.
                {path: "/200", body: []byte("hello"), sent: 0, status: 200},       // Got 200 without 100. body isn't sent.
                {path: "/500", body: []byte("hello"), sent: 0, status: 500},       // Got 500 without 100. body isn't sent.
-               {path: "/keepalive", body: []byte("hello"), sent: 0, status: 500}, // Althogh without Connection:close, body isn't sent.
+               {path: "/keepalive", body: []byte("hello"), sent: 0, status: 500}, // Although without Connection:close, body isn't sent.
                {path: "/timeout", body: []byte("hello"), sent: 5, status: 200},   // Timeout exceeded and entire body is sent.
        }
 
index 208f37f9fd34aa45d862f0886b78fb376d44dafd..e0814798e7a5b6239402754d5ee940563beefdcb 100644 (file)
@@ -161,7 +161,7 @@ func newAddr(ifi *Interface, m *syscall.InterfaceAddrMessage) (*IPNet, error) {
        case *syscall.SockaddrInet6:
                ifa.IP = make(IP, IPv6len)
                copy(ifa.IP, sa.Addr[:])
-               // NOTE: KAME based IPv6 protcol stack usually embeds
+               // NOTE: KAME based IPv6 protocol stack usually embeds
                // the interface index in the interface-local or
                // link-local address as the kernel-internal form.
                if ifa.IP.IsLinkLocalUnicast() {
index b7a333849d142f48322ab880de91413cdddb7e17..b3719d6092e708283703cfed873c089a0172a48e 100644 (file)
@@ -49,7 +49,7 @@ func newMulticastAddr(ifi *Interface, m *syscall.InterfaceMulticastAddrMessage)
        case *syscall.SockaddrInet6:
                ifma := IPAddr{IP: make(IP, IPv6len)}
                copy(ifma.IP, sa.Addr[:])
-               // NOTE: KAME based IPv6 protcol stack usually embeds
+               // NOTE: KAME based IPv6 protocol stack usually embeds
                // the interface index in the interface-local or
                // link-local address as the kernel-internal form.
                if ifma.IP.IsInterfaceLocalMulticast() || ifma.IP.IsLinkLocalMulticast() {
index c42d90b7403e8b858673ff01b3971b72d975dc81..44ef2c1a2aebed7ba66291901b7d88f0c75967d5 100644 (file)
@@ -49,7 +49,7 @@ func newMulticastAddr(ifi *Interface, m *syscall.InterfaceMulticastAddrMessage)
        case *syscall.SockaddrInet6:
                ifma := IPAddr{IP: make(IP, IPv6len)}
                copy(ifma.IP, sa.Addr[:])
-               // NOTE: KAME based IPv6 protcol stack usually embeds
+               // NOTE: KAME based IPv6 protocol stack usually embeds
                // the interface index in the interface-local or
                // link-local address as the kernel-internal form.
                if ifma.IP.IsInterfaceLocalMulticast() || ifma.IP.IsLinkLocalMulticast() {
index 7bdd924150371e9c6d369929dbb9389c9ce840ad..6721f72bb57bac8bd0bebbb4e75ebb8709d464f8 100644 (file)
@@ -102,7 +102,7 @@ func TestInterfaces(t *testing.T) {
                }
                // Test the existence of connected unicast routes for
                // IPv6. We can assume the existence of ::1/128 when
-               // at least one looopback interface is installed.
+               // at least one loopback interface is installed.
                if supportsIPv6 && stats.loop > 0 && stats.uni6 == 0 {
                        t.Errorf("num IPv6 unicast routes = 0; want >0; summary: %+v", stats)
                }
@@ -155,7 +155,7 @@ func TestInterfaceAddrs(t *testing.T) {
        }
        // Test the existence of connected unicast routes for IPv6.
        // We can assume the existence of ::1/128 when at least one
-       // looopback interface is installed.
+       // loopback interface is installed.
        if supportsIPv6 && stats.loop > 0 && stats.uni6 == 0 {
                t.Errorf("num IPv6 unicast routes = 0; want >0; summary: %+v", stats)
        }
index 93b3b79afda8c4099c023e42f4417fc698c611a6..dd20de4ac789a62e6e9bf2822612da197e5256a5 100644 (file)
@@ -56,7 +56,7 @@ func TestPointToPointInterface(t *testing.T) {
        for i := 0; i < 3; i++ {
                ti := &testInterface{local: local, remote: remote}
                if err := ti.setPointToPoint(5963 + i); err != nil {
-                       t.Skipf("test requries external command: %v", err)
+                       t.Skipf("test requires external command: %v", err)
                }
                if err := ti.setup(); err != nil {
                        t.Fatal(err)
index 3d95a73c097539a8b8400e0e9db1fdee7181ae82..2b24baf58e96338060b6862cbaad6a716121d8c1 100644 (file)
@@ -379,8 +379,8 @@ var splitJoinTests = []struct {
        {"", "0", ":0"},
 
        {"google.com", "https%foo", "google.com:https%foo"}, // Go 1.0 behavior
-       {"127.0.0.1", "", "127.0.0.1:"},                     // Go 1.0 behaviour
-       {"www.google.com", "", "www.google.com:"},           // Go 1.0 behaviour
+       {"127.0.0.1", "", "127.0.0.1:"},                     // Go 1.0 behavior
+       {"www.google.com", "", "www.google.com:"},           // Go 1.0 behavior
 }
 
 var splitFailureTests = []struct {
index 2bddd46a156e5bbc10f2f9c45a029e4d7b106e9d..d512fc3e57a74e01d1d6d7e3bd57001921ec0c93 100644 (file)
@@ -61,7 +61,7 @@ func probeIPv6Stack() (supportsIPv6, supportsIPv4map bool) {
                // Some released versions of DragonFly BSD pretend to
                // accept IPV6_V6ONLY=0 successfully, but the state
                // still stays IPV6_V6ONLY=1. Eventually DragonFly BSD
-               // stops preteding, but the transition period would
+               // stops pretending, but the transition period would
                // cause unpredictable behavior and we need to avoid
                // it.
                //
index 51ffe672388ef6829f6b869e69c1dbec5cd84e5c..158a8ed598e6c0a6b7482d75e98033bf09600775 100644 (file)
@@ -157,7 +157,7 @@ var dualStackTCPListenerTests = []struct {
        network2, address2 string // second listener
        xerr               error  // expected error value, nil or other
 }{
-       // Test cases and expected results for the attemping 2nd listen on the same port
+       // Test cases and expected results for the attempting 2nd listen on the same port
        // 1st listen                2nd listen                 darwin  freebsd  linux  openbsd
        // ------------------------------------------------------------------------------------
        // "tcp"  ""                 "tcp"  ""                    -        -       -       -
@@ -301,7 +301,7 @@ var dualStackUDPListenerTests = []struct {
 }
 
 // TestDualStackUDPListener tests both single and double listen
-// to a test listener with various address families, differnet
+// to a test listener with various address families, different
 // listening address and same port.
 func TestDualStackUDPListener(t *testing.T) {
        switch runtime.GOOS {
index df390327218e3307a97609ff65f51bc1e505c3b7..ab217989690da13f91929e928370335f29cae51e 100644 (file)
@@ -315,7 +315,7 @@ func TestInterfacesWithNetsh(t *testing.T) {
 }
 
 func netshInterfaceIPv4ShowAddress(name string, netshOutput []byte) []string {
-       // adress information is listed like:
+       // Address information is listed like:
        //
        //Configuration for interface "Local Area Connection"
        //    DHCP enabled:                         Yes
@@ -378,7 +378,7 @@ func netshInterfaceIPv4ShowAddress(name string, netshOutput []byte) []string {
 }
 
 func netshInterfaceIPv6ShowAddress(name string, netshOutput []byte) []string {
-       // adress information is listed like:
+       // Address information is listed like:
        //
        //Address ::1 Parameters
        //---------------------------------------------------------
index f3f3b54b886b034b6a7d218d377d0177270bc51d..eafb372f7c40104da4f42c14407ac6386a01dc57 100644 (file)
@@ -18,7 +18,7 @@ import (
 //
 // if handled == false, sendFile performed no work.
 //
-// Note that sendfile for windows does not suppport >2GB file.
+// Note that sendfile for windows does not support >2GB file.
 func sendFile(fd *netFD, r io.Reader) (written int64, err error, handled bool) {
        var n int64 = 0 // by default, copy until EOF
 
index b25f96a3fd3a4642d5a7d7b5a1d3b61300cfd32f..12d1256f0a8ad07cd46d6dac4cba150dcd52fda8 100644 (file)
@@ -356,7 +356,7 @@ func TestUDPZeroByteBuffer(t *testing.T) {
                switch err {
                case nil: // ReadFrom succeeds
                default: // Read may timeout, it depends on the platform
-                       if nerr, ok := err.(Error); (!ok || !nerr.Timeout()) && runtime.GOOS != "windows" { // Windows retruns WSAEMSGSIZ
+                       if nerr, ok := err.(Error); (!ok || !nerr.Timeout()) && runtime.GOOS != "windows" { // Windows returns WSAEMSGSIZ
                                t.Fatal(err)
                        }
                }
index 52b4724ab02a20a790b9dae89ebff0bbc17e1686..a69b5176d5aff4c021733937f8390e9e502fb8b3 100644 (file)
@@ -341,7 +341,7 @@ func TestExtraFilesFDShuffle(t *testing.T) {
        //
        // We want to test that FDs in the child do not get overwritten
        // by one another as this shuffle occurs. The original implementation
-       // was buggy in that in some data dependent cases it would ovewrite
+       // was buggy in that in some data dependent cases it would overwrite
        // stderr in the child with one of the ExtraFile members.
        // Testing for this case is difficult because it relies on using
        // the same FD values as that case. In particular, an FD of 3
index 8e1d4239bf128c92035f477e4f93e5b6a33d313a..042e5a1389eb7db019d24441b3fef7cef40bed56 100644 (file)
@@ -117,7 +117,7 @@ func createEnv(dir, PATH, PATHEXT string) []string {
 }
 
 // createFiles copies srcPath file into multiply files.
-// It uses dir as preifx for all destination files.
+// It uses dir as prefix for all destination files.
 func createFiles(t *testing.T, dir string, files []string, srcPath string) {
        for _, f := range files {
                installProg(t, filepath.Join(dir, f), srcPath)
@@ -431,7 +431,7 @@ var commandTests = []commandTest{
        },
        {
                // LookPath(`a.exe`) will find `.\a.exe`, but prefixing that with
-               // dir `p\a.exe` will refer to not existant file
+               // dir `p\a.exe` will refer to a non-existent file
                files: []string{`a.exe`, `p\not_important_file`},
                dir:   `p`,
                arg0:  `a.exe`,
@@ -440,7 +440,7 @@ var commandTests = []commandTest{
        },
        {
                // like above, but making test succeed by installing file
-               // in refered destination (so LookPath(`a.exe`) will still
+               // in referred destination (so LookPath(`a.exe`) will still
                // find `.\a.exe`, but we successfully execute `p\a.exe`)
                files: []string{`a.exe`, `p\a.exe`},
                dir:   `p`,
index 945724b2b259652d72b55e6cba57baab2b421647..68f8f2b90a2418a965d446f64cf3306f3ec84616 100644 (file)
@@ -538,7 +538,7 @@ func TestReaddirStatFailures(t *testing.T) {
                return s
        }
 
-       if got, want := names(mustReadDir("inital readdir")),
+       if got, want := names(mustReadDir("initial readdir")),
                []string{"good1", "good2", "x"}; !reflect.DeepEqual(got, want) {
                t.Errorf("initial readdir got %q; want %q", got, want)
        }
index d3e03e984954678ba309abd3cc1324927dbd7f74..cba9fa3e8d41de985a6f6c45eb293b4be322ea2f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Simple converions to avoid depending on strconv.
+// Simple conversions to avoid depending on strconv.
 
 package os
 
index 99c325ff010c3dc18c7b828e88b094b308c4c40c..9fb3c5546f27fe10e4fd17532c3548f55ec2e8b0 100644 (file)
@@ -61,7 +61,7 @@ func lookupFullName(domain, username, domainAndUser string) (string, error) {
        if err == nil {
                return name, nil
        }
-       // domain worked neigher as a domain nor as a server
+       // domain worked neither as a domain nor as a server
        // could be domain server unavailable
        // pretend username is fullname
        return username, nil
index ef6e7ca93f4adaaed37d334cd1d6e90ef628ef05..41c57df73869c6fe302ad4ba36869b244ed7c930 100644 (file)
@@ -121,7 +121,7 @@ func join(elem []string) string {
 // joinNonEmpty is like join, but it assumes that the first element is non-empty.
 func joinNonEmpty(elem []string) string {
        if len(elem[0]) == 2 && elem[0][1] == ':' {
-               // First element is drive leter without terminating slash.
+               // First element is drive letter without terminating slash.
                // Keep path relative to current directory on that drive.
                return Clean(elem[0] + strings.Join(elem[1:], string(Separator)))
        }
index c80df3407777aef8a3502d572ffd78eb77f02b6d..58090cde70d3fb3b810255e1c6ad192ca313f32c 100644 (file)
@@ -4465,7 +4465,7 @@ func TestFieldByIndexNil(t *testing.T) {
 // off the stack into the frame will store an *Inner there, and then if a garbage collection
 // happens to scan that argument frame before it is discarded, it will scan the *Inner
 // memory as if it were an *Outer. If the two have different memory layouts, the
-// collection will intepret the memory incorrectly.
+// collection will interpret the memory incorrectly.
 //
 // One such possible incorrect interpretation is to treat two arbitrary memory words
 // (Inner.P1 and Inner.P2 below) as an interface (Outer.R below). Because interpreting
index 4872cb3def44932859af81b4ba480a07232d224b..0f95b95972b971dc9b05a7312e53a948ffe8caad 100644 (file)
@@ -409,7 +409,7 @@ Reading:
                //     h        REG_MULTIREF            multiple digit backref
                //     i        REG_ICASE               ignore case
                //     j        REG_SPAN                . matches \n
-               //     k        REG_ESCAPE              \ to ecape [...] delimiter
+               //     k        REG_ESCAPE              \ to escape [...] delimiter
                //     l        REG_LEFT                implicit ^...
                //     m        REG_MINIMAL             minimal match
                //     n        REG_NEWLINE             explicit \n match
index 5d0206d1c99bf4827d97376f8d640f3c5143249b..2fdfbea0e14f8e617380457bbb7a6cd736a41f6c 100644 (file)
@@ -706,7 +706,7 @@ TEXT runtime·abort(SB),NOSPLIT,$-4-0
 // armPublicationBarrier is a native store/store barrier for ARMv7+.
 // On earlier ARM revisions, armPublicationBarrier is a no-op.
 // This will not work on SMP ARMv6 machines, if any are in use.
-// To implement publiationBarrier in sys_$GOOS_arm.s using the native
+// To implement publicationBarrier in sys_$GOOS_arm.s using the native
 // instructions, use:
 //
 //     TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0
index 08f230d47ef7632b665b14fe53b502b550604230..14ac9da0ac9c6e752db82736cc9938302b8a6056 100644 (file)
@@ -78,7 +78,7 @@ var _cgo_thread_start = &x_cgo_thread_start
 var x_cgo_sys_thread_create byte
 var _cgo_sys_thread_create = &x_cgo_sys_thread_create
 
-// Notifies that the runtime has been intialized.
+// Notifies that the runtime has been initialized.
 //
 // We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)
 // to ensure that the runtime has been initialized before the CGO call is
index 497e87f43d95f4618fea9d43d649b62f49ec6626..2cdfae866c2560eedd189f1284f7a24b07f0d9f8 100644 (file)
@@ -573,7 +573,7 @@ func TestSelectDuplicateChannel(t *testing.T) {
                }
                e <- 9
        }()
-       time.Sleep(time.Millisecond) // make sure goroutine A gets qeueued first on c
+       time.Sleep(time.Millisecond) // make sure goroutine A gets queued first on c
 
        // goroutine B
        go func() {
index c257d59b30b85d9fd3971e934721cbe392d550d2..6f30eca2427b75d2229fa0e14a1184b635551cc7 100644 (file)
@@ -103,7 +103,7 @@ loop_avx2_huge:
        ADDQ    $128, DI
        CMPQ    BX, $128
        JAE     loop_avx2_huge
-       // In the desciption of MOVNTDQ in [1]
+       // In the description of MOVNTDQ in [1]
        // "... fencing operation implemented with the SFENCE or MFENCE instruction
        // should be used in conjunction with MOVNTDQ instructions..."
        // [1] 64-ia-32-architectures-software-developer-manual-325462.pdf
index b6d0b854598fb60092e9de2d9148b9baf6dc2876..ea73b455b478515f45262f37e30254d6020e5577 100644 (file)
@@ -24,7 +24,7 @@ check:
        BC      12, 9, backward // I think you should be able to write this as "BGT CR2, backward"
 
        // Copying forward proceeds by copying R6 words then copying R7 bytes.
-       // R3 and R4 are advanced as we copy. Becuase PPC64 lacks post-increment
+       // R3 and R4 are advanced as we copy. Because PPC64 lacks post-increment
        // load/store, R3 and R4 point before the bytes that are to be copied.
 
        BC      12, 6, noforwardlarge   // "BEQ CR1, noforwardlarge"
index 0a0285d8163ca9f0225f8de06a7961213f1dc748..340604fb36d77eee4aed075809f10b509f2e16a5 100644 (file)
@@ -259,7 +259,7 @@ func (w *gcWork) empty() bool {
 type workbufhdr struct {
        node  lfnode // must be first
        nobj  int
-       inuse bool   // This workbuf is in use by some gorotuine and is not on the work.empty/full queues.
+       inuse bool   // This workbuf is in use by some goroutine and is not on the work.empty/full queues.
        log   [4]int // line numbers forming a history of ownership changes to workbuf
 }
 
index 86e9b997ef658b93a0c8d4b3f8fb576d58a53cf9..53b2aacdb57746d75ad5db866c58bd94d84f4389 100644 (file)
@@ -58,7 +58,7 @@ import "unsafe"
 //
 // The open and arming mechanisms are serialized using the lock
 // inside PollDesc. This is required because the netpoll loop runs
-// asynchonously in respect to other Go code and by the time we get
+// asynchronously in respect to other Go code and by the time we get
 // to call port_associate to update the association in the loop, the
 // file descriptor might have been closed and reopened already. The
 // lock allows runtime·netpollupdate to be called synchronously from
@@ -125,7 +125,7 @@ func netpollopen(fd uintptr, pd *pollDesc) int32 {
        lock(&pd.lock)
        // We don't register for any specific type of events yet, that's
        // netpollarm's job. We merely ensure we call port_associate before
-       // asynchonous connect/accept completes, so when we actually want
+       // asynchronous connect/accept completes, so when we actually want
        // to do any I/O, the call to port_associate (from netpollarm,
        // with the interested event set) will unblock port_getn right away
        // because of the I/O readiness notification.
index 389917916fb9b50be0c083ef8409c536a1886b6e..2dc53b5b72cc210171ff85f415ca3bd5cfac3b80 100644 (file)
@@ -3910,7 +3910,7 @@ retry:
        if runqputslow(_p_, gp, h, t) {
                return
        }
-       // the queue is not full, now the put above must suceed
+       // the queue is not full, now the put above must succeed
        goto retry
 }
 
index a6150a77ee9502b99b9673af7d7d86272d75024e..b3350ef82fff3e5aeee3c16bf7e14adbe0d84e76 100644 (file)
@@ -104,7 +104,7 @@ func TestStopCPUProfilingWithProfilerOff(t *testing.T) {
 // of the larger addresses must themselves be invalid addresses.
 // We might get unlucky and the OS might have mapped one of these
 // addresses, but probably not: they're all in the first page, very high
-// adderesses that normally an OS would reserve for itself, or malformed
+// addresses that normally an OS would reserve for itself, or malformed
 // addresses. Even so, we might have to remove one or two on different
 // systems. We will see.
 
index 202e7bbf862bac6bdaabd1e492aae96c2383fa0b..99048d612eb600c99f113fe904b3863ca809de36 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Software floating point interpretaton of ARM 7500 FP instructions.
+// Software floating point interpretation of ARM 7500 FP instructions.
 // The interpretation is not bit compatible with the 7500.
 // It uses true little-endian doubles, while the 7500 used mixed-endian.
 
index 3a82674684b0fdbe3e6c5db7718d5b8ea0c538f8..09f22636a9f7f6835ef6482e2d009a08c47ecc5e 100644 (file)
@@ -52,7 +52,7 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$0
 // pipe(3c) wrapper that returns fds in AX, DX.
 // NOT USING GO CALLING CONVENTION.
 TEXT runtime·pipe1(SB),NOSPLIT,$0
-       SUBQ    $16, SP // 8 bytes will do, but stack has to be 16-byte alligned
+       SUBQ    $16, SP // 8 bytes will do, but stack has to be 16-byte aligned
        MOVQ    SP, DI
        LEAQ    libc_pipe(SB), AX
        CALL    AX
index a5da6b2630bcc84d263933300002c569cce4a2f7..60fac2d695180aadaf2bd1624715bafa8d311f00 100644 (file)
@@ -506,10 +506,10 @@ func TestStability(t *testing.T) {
        data.initB()
        Stable(data)
        if !IsSorted(data) {
-               t.Errorf("Stable shuffeled sorted %d ints (order)", n)
+               t.Errorf("Stable shuffled sorted %d ints (order)", n)
        }
        if !data.inOrder() {
-               t.Errorf("Stable shuffeled sorted %d ints (stability)", n)
+               t.Errorf("Stable shuffled sorted %d ints (stability)", n)
        }
 
        // sorted reversed
index c635a1385e2b20904ebfee9b6b55f87300103ef9..d9b6697a759e60476bdceceb8a41251a41f2b8e1 100644 (file)
@@ -138,7 +138,7 @@ func parseNetworkLayerAddr(b []byte, family byte) (Sockaddr, error) {
        //
        // - The kernel form appends leading bytes to the prefix field
        //   to make the <length, prefix> tuple to be conformed with
-       //   the routing messeage boundary
+       //   the routing message boundary
        l := int(rsaAlignOf(int(b[0])))
        if len(b) < l {
                return nil, EINVAL
index a8342f50aa527e36c6f723feed9fe84afb15563e..c8723cb7a8b1529978273c0d744ae94b39d2a551 100644 (file)
@@ -4,7 +4,7 @@
 
 package template
 
-// Tests for mulitple-template parsing and execution.
+// Tests for multiple-template parsing and execution.
 
 import (
        "bytes"