]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix typos
authorShenghou Ma <minux.ma@gmail.com>
Tue, 18 Dec 2012 19:04:09 +0000 (03:04 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 18 Dec 2012 19:04:09 +0000 (03:04 +0800)
caught by https://github.com/lyda/misspell-check.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6949072

18 files changed:
src/cmd/go/doc.go
src/cmd/vet/main.go
src/cmd/yacc/yacc.go
src/pkg/compress/flate/deflate.go
src/pkg/crypto/cipher/example_test.go
src/pkg/crypto/x509/x509_test.go
src/pkg/database/sql/sql.go
src/pkg/encoding/csv/writer.go
src/pkg/exp/locale/collate/build/trie.go
src/pkg/exp/norm/iter.go
src/pkg/exp/norm/normalize_test.go
src/pkg/exp/norm/triegen.go
src/pkg/exp/types/expr.go
src/pkg/go/format/format.go
src/pkg/go/printer/nodes.go
src/pkg/math/big/nat.go
src/pkg/strconv/ftoa.go
src/pkg/time/zoneinfo_read.go

index 588a06173351a9f3bd4d31eb10feef5f785bf682..ab3189c6bfabb3ffca7dde63aeb857a95c8eaf78 100644 (file)
@@ -625,7 +625,7 @@ The meta tag has the form:
 
        <meta name="go-import" content="import-prefix vcs repo-root">
 
-The import-prefix is the import path correponding to the repository
+The import-prefix is the import path corresponding to the repository
 root. It must be a prefix or an exact match of the package being
 fetched with "go get". If it's not an exact match, another http
 request is made at the prefix to verify the <meta> tags match.
index 76a4896bfa0ed96902d71dad108977cd264c65fb..ec751972cfac68ce8de4f22d23cbc01eec10d0f4 100644 (file)
@@ -255,7 +255,7 @@ func (f *File) walkInterfaceType(t *ast.InterfaceType) {
        }
 }
 
-// walkRangeStmt walks a range statment.
+// walkRangeStmt walks a range statement.
 func (f *File) walkRangeStmt(n *ast.RangeStmt) {
        checkRangeLoop(f, n)
 }
index 25bd2229871a201eabe5ffaa4414d62aa667f9f4..62655e7cd2549747989ec11334dc371f4aaca5a9 100644 (file)
@@ -2893,7 +2893,7 @@ func others() {
                j = tokset[i].value
                if j >= 0 && j < 256 {
                        if temp1[j] != 0 {
-                               fmt.Print("yacc bug -- cant have 2 different Ts with same value\n")
+                               fmt.Print("yacc bug -- cannot have 2 different Ts with same value\n")
                                fmt.Printf("    %s and %s\n", tokset[i].name, tokset[temp1[j]].name)
                                nerrors++
                        }
@@ -2917,7 +2917,7 @@ func others() {
                j = tokset[i].value - PRIVATE
                if j >= 0 && j < 256 {
                        if temp1[j] != 0 {
-                               fmt.Print("yacc bug -- cant have 2 different Ts with same value\n")
+                               fmt.Print("yacc bug -- cannot have 2 different Ts with same value\n")
                                fmt.Printf("    %s and %s\n", tokset[i].name, tokset[temp1[j]].name)
                                nerrors++
                        }
index e511b50fd1b079066382eaf59b5de29c53a978e8..d357fe361a55ed0bad4f1637e7c014ffc32e2146 100644 (file)
@@ -22,7 +22,7 @@ const (
        logMaxOffsetSize   = 15  // Standard DEFLATE
        minMatchLength     = 3   // The smallest match that the compressor looks for
        maxMatchLength     = 258 // The longest match for the compressor
-       minOffsetSize      = 1   // The shortest offset that makes any sence
+       minOffsetSize      = 1   // The shortest offset that makes any sense
 
        // The maximum number of tokens we put into a single flat block, just too
        // stop things from getting too large.
index c888eb2c6a2f0bcdf49e5e2d802a9979fb4bf1b3..e0027cac23b145e523566fde4d5efb30e4d92ed3 100644 (file)
@@ -241,7 +241,7 @@ func ExampleStreamReader() {
 
        // Note that this example is simplistic in that it omits any
        // authentication of the encrypted data. It you were actually to use
-       // StreamReader in this manner, an attacker could flip arbitary bits in
+       // StreamReader in this manner, an attacker could flip arbitrary bits in
        // the output.
 }
 
@@ -278,6 +278,6 @@ func ExampleStreamWriter() {
 
        // Note that this example is simplistic in that it omits any
        // authentication of the encrypted data. It you were actually to use
-       // StreamReader in this manner, an attacker could flip arbitary bits in
+       // StreamReader in this manner, an attacker could flip arbitrary bits in
        // the decrypted result.
 }
index a13f4598d58aee648fe6a945219124e9a4150081..b2d6fe3d552bb03efb436b3e6c376d132ddfb570 100644 (file)
@@ -439,7 +439,7 @@ func TestECDSA(t *testing.T) {
                        t.Errorf("%d: public key algorithm is %v, want ECDSA", i, pka)
                }
                if err = cert.CheckSignatureFrom(cert); err != nil {
-                       t.Errorf("%d: certificate verfication failed: %s", i, err)
+                       t.Errorf("%d: certificate verification failed: %s", i, err)
                }
        }
 }
@@ -519,7 +519,7 @@ func TestVerifyCertificateWithDSASignature(t *testing.T) {
        }
        // test cert is self-signed
        if err = cert.CheckSignatureFrom(cert); err != nil {
-               t.Fatalf("DSA Certificate verfication failed: %s", err)
+               t.Fatalf("DSA Certificate verification failed: %s", err)
        }
 }
 
index e59d0130d5ea75ab99d68ae13027ee9cb77ca51f..e7c7780ef2e685ed9456cec45c2dbcd7cd6ffcbe 100644 (file)
@@ -266,7 +266,7 @@ func (db *DB) connIfFree(wanted driver.Conn) (conn driver.Conn, ok bool) {
 var putConnHook func(*DB, driver.Conn)
 
 // putConn adds a connection to the db's free pool.
-// err is optionally the last error that occured on this connection.
+// err is optionally the last error that occurred on this connection.
 func (db *DB) putConn(c driver.Conn, err error) {
        if err == driver.ErrBadConn {
                // Don't reuse bad connections.
index 221542456ba41bd1c112462311501254fd587a9a..1faecb6648061986846062a472c72908844d1e4e 100644 (file)
@@ -92,7 +92,7 @@ func (w *Writer) Write(record []string) (err error) {
 }
 
 // Flush writes any buffered data to the underlying io.Writer.
-// To check if an error occured during the Flush, call Error.
+// To check if an error occurred during the Flush, call Error.
 func (w *Writer) Flush() {
        w.w.Flush()
 }
index f5214279e2853416d42943c1b78e0a7977415b52..9404a3465bf410aa6aeeb2bc5027897231d98102 100644 (file)
@@ -20,7 +20,7 @@ import (
 
 const (
        blockSize   = 64
-       blockOffset = 2 // Substract 2 blocks to compensate for the 0x80 added to continuation bytes.
+       blockOffset = 2 // Subtract 2 blocks to compensate for the 0x80 added to continuation bytes.
 )
 
 type trieHandle struct {
index c0ab25e5658679082d12a441d7851454904164d1..def822d8e1c34da4bd7f4e7582dee5a13a78b01e 100644 (file)
@@ -179,7 +179,7 @@ doNorm:
        i.rb.src.copySlice(out[outCopyStart:], inCopyStart, i.p)
        if !i.rb.insertDecomposed(out[i.outStart:outp]) {
                // Start over to prevent decompositions from crossing segment boundaries.
-               // This is a rare occurance.
+               // This is a rare occurrence.
                i.p = i.inStart
                i.info = i.rb.f.info(i.rb.src, i.p)
        }
index 8b970598b4d1faed388067d6bda157eb1ec5afb4..1a118f2d14d12a90e09aaae47f7f94dd6f2e4a94 100644 (file)
@@ -31,7 +31,7 @@ func runPosTests(t *testing.T, name string, f Form, fn positionFunc, tests []Pos
                }
                runes := []rune(test.buffer)
                if rb.nrune != len(runes) {
-                       t.Errorf("%s:%d: reorder buffer lenght is %d; want %d", name, i, rb.nrune, len(runes))
+                       t.Errorf("%s:%d: reorder buffer length is %d; want %d", name, i, rb.nrune, len(runes))
                        continue
                }
                for j, want := range runes {
index 1780ac7129dd45ba9c6a70b454eb41e6e11012c3..52c88b039a2495ebef7bbf2a8ff130c15e35940e 100644 (file)
@@ -21,7 +21,7 @@ import (
 
 const (
        blockSize        = 64
-       blockOffset      = 2 // Substract two blocks to compensate for the 0x80 added to continuation bytes.
+       blockOffset      = 2 // Subtract two blocks to compensate for the 0x80 added to continuation bytes.
        maxSparseEntries = 16
 )
 
index 2f53bc085e39d7fde291da9d58bb96c187a94ef6..2f5f2b3f1ec6bde71466b6609874fa29928381d1 100644 (file)
@@ -598,7 +598,7 @@ func (check *checker) recordType(x *operand) {
 }
 
 // rawExpr typechecks expression e and initializes x with the expression
-// value or type. If an error occured, x.mode is set to invalid.
+// value or type. If an error occurred, x.mode is set to invalid.
 // A hint != nil is used as operand type for untyped shifted operands;
 // iota >= 0 indicates that the expression is part of a constant declaration.
 // cycleOk indicates whether it is ok for a type expression to refer to itself.
@@ -667,7 +667,7 @@ func (check *checker) rawExpr(x *operand, e ast.Expr, hint Type, iota int, cycle
                x.typ = obj.Type.(Type)
 
        case *ast.Ellipsis:
-               // ellipses are handled explictly where they are legal
+               // ellipses are handled explicitly where they are legal
                // (array composite literals and parameter lists)
                check.errorf(e.Pos(), "invalid use of '...'")
                goto Error
@@ -1284,14 +1284,14 @@ func (check *checker) rawTyp(e ast.Expr, cycleOk, nilOk bool) Type {
 }
 
 // typOrNil is like rawExpr but reports an error if e doesn't represents a type or the predeclared value nil.
-// It returns e's type, nil, or Typ[Invalid] if an error occured.
+// It returns e's type, nil, or Typ[Invalid] if an error occurred.
 //
 func (check *checker) typOrNil(e ast.Expr, cycleOk bool) Type {
        return check.rawTyp(e, cycleOk, true)
 }
 
 // typ is like rawExpr but reports an error if e doesn't represents a type.
-// It returns e's type, or Typ[Invalid] if an error occured.
+// It returns e's type, or Typ[Invalid] if an error occurred.
 //
 func (check *checker) typ(e ast.Expr, cycleOk bool) Type {
        return check.rawTyp(e, cycleOk, false)
index 286296ebc6fc83b3d87fe2b61f6476357eec5ed7..65b0e4e4b79b9b37d6116f6e5a452935a158645e 100644 (file)
@@ -46,7 +46,7 @@ func Node(dst io.Writer, fset *token.FileSet, node interface{}) error {
        // Sort imports if necessary.
        if file != nil && hasUnsortedImports(file) {
                // Make a copy of the AST because ast.SortImports is destructive.
-               // TODO(gri) Do this more efficently.
+               // TODO(gri) Do this more efficiently.
                var buf bytes.Buffer
                err := config.Fprint(&buf, fset, file)
                if err != nil {
index cd5b67b82df3e005aaf775e211d13b91732dd5de..3bed0cc6572c6beb30d5a561ce06f19686a80b3b 100644 (file)
@@ -83,7 +83,7 @@ func (p *printer) setComment(g *ast.CommentGroup) {
        // don't overwrite any pending comment in the p.comment cache
        // (there may be a pending comment when a line comment is
        // immediately followed by a lead comment with no other
-       // tokens inbetween)
+       // tokens between)
        if p.commentOffset == infinity {
                p.nextComment() // get comment ready for use
        }
index 13a623a70327b0fd771387baa79dfc7678721697..9d09f97b77bf275c73bf3d6270ed98e7236d7d66 100644 (file)
@@ -826,7 +826,7 @@ func (x nat) string(charset string) string {
 
 // Convert words of q to base b digits in s. If q is large, it is recursively "split in half"
 // by nat/nat division using tabulated divisors. Otherwise, it is converted iteratively using
-// repeated nat/Word divison.
+// repeated nat/Word division.
 //
 // The iterative method processes n Words by n divW() calls, each of which visits every Word in the
 // incrementally shortened q for a total of n + (n-1) + (n-2) ... + 2 + 1, or n(n+1)/2 divW()'s.
index 8067881e0d13ec4b96e79139bbc9b3b72dd349ee..1a9c41b85a89d3bb56861bc9a096c17679a7679d 100644 (file)
@@ -255,7 +255,7 @@ func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) {
 
        // d = mant << (exp - mantbits)
        // Next highest floating point number is mant+1 << exp-mantbits.
-       // Our upper bound is halfway inbetween, mant*2+1 << exp-mantbits-1.
+       // Our upper bound is halfway between, mant*2+1 << exp-mantbits-1.
        upper := new(decimal)
        upper.Assign(mant*2 + 1)
        upper.Shift(exp - int(flt.mantbits) - 1)
@@ -265,7 +265,7 @@ func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) {
        // unless mant-1 drops the significant bit and exp is not the minimum exp,
        // in which case the next lowest is mant*2-1 << exp-mantbits-1.
        // Either way, call it mantlo << explo-mantbits.
-       // Our lower bound is halfway inbetween, mantlo*2+1 << explo-mantbits-1.
+       // Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1.
        var mantlo uint64
        var explo int
        if mant > 1<<flt.mantbits || exp == minexp {
index 0eb20c7637cc173b8208302cfb418bc2fa93569c..a5a2de218ef1a909b8441e060071db5b07e7117c 100644 (file)
@@ -174,7 +174,7 @@ func loadZoneData(bytes []byte) (l *Location, err error) {
                }
        }
 
-       // Commited to succeed.
+       // Committed to succeed.
        l = &Location{zone: zone, tx: tx}
 
        // Fill in the cache with information about right now,