]> Cypherpunks repositories - gostls13.git/commitdiff
all: spelling tweaks, A-G
authorRobert Hencke <robert.hencke@gmail.com>
Tue, 29 Apr 2014 16:44:40 +0000 (12:44 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 29 Apr 2014 16:44:40 +0000 (12:44 -0400)
LGTM=ruiu, bradfitz
R=golang-codereviews, bradfitz, ruiu
CC=golang-codereviews
https://golang.org/cl/91840044

23 files changed:
src/cmd/cgo/out.go
src/pkg/archive/tar/reader_test.go
src/pkg/bufio/bufio_test.go
src/pkg/bufio/scan.go
src/pkg/bufio/scan_test.go
src/pkg/compress/bzip2/bzip2_test.go
src/pkg/compress/flate/inflate.go
src/pkg/compress/flate/reader_test.go
src/pkg/compress/zlib/writer_test.go
src/pkg/crypto/rsa/pkcs1v15.go
src/pkg/crypto/rsa/pss.go
src/pkg/crypto/tls/conn.go
src/pkg/database/sql/sql.go
src/pkg/database/sql/sql_test.go
src/pkg/debug/elf/elf.go
src/pkg/debug/goobj/read.go
src/pkg/expvar/expvar.go
src/pkg/fmt/doc.go
src/pkg/fmt/format.go
src/pkg/go/ast/commentmap.go
src/pkg/go/doc/example.go
src/pkg/go/parser/parser.go
src/pkg/go/printer/printer_test.go

index a1fc2bd4ff57b66144d141cce25c5da002329454..76c7247af0dcf7a0885cf9c21929ec86054fab9e 100644 (file)
@@ -485,7 +485,7 @@ func (p *Package) writeOutput(f *File, srcfile string) {
        fgcc.Close()
 }
 
-// fixGo convers the internal Name.Go field into the name we should show
+// fixGo converts the internal Name.Go field into the name we should show
 // to users in error messages. There's only one for now: on input we rewrite
 // C.malloc into C._CMalloc, so change it back here.
 func fixGo(name string) string {
index 6d4e06a58dd830bcf065ed460b152311405b2f3a..ed058978cc2688b4cbe995b3a6d1eeb5143852db 100644 (file)
@@ -471,7 +471,7 @@ func TestParsePAXHeader(t *testing.T) {
 func TestParsePAXTime(t *testing.T) {
        // Some valid PAX time values
        timestamps := map[string]time.Time{
-               "1350244992.023960108":  time.Unix(1350244992, 23960108), // The commoon case
+               "1350244992.023960108":  time.Unix(1350244992, 23960108), // The common case
                "1350244992.02396010":   time.Unix(1350244992, 23960100), // Lower precision value
                "1350244992.0239601089": time.Unix(1350244992, 23960108), // Higher precision value
                "1350244992":            time.Unix(1350244992, 0),        // Low precision value
index 49803009f96baaab9c50bd8af20d88c1b0f90464..76d3c8eade814264adf5b46ed2f0ae48f838b28f 100644 (file)
@@ -349,7 +349,7 @@ func TestUnreadByteMultiple(t *testing.T) {
 }
 
 func TestUnreadByteOthers(t *testing.T) {
-       // A list of readers to use in conjuction with UnreadByte.
+       // A list of readers to use in conjunction with UnreadByte.
        var readers = []func(*Reader, byte) ([]byte, error){
                (*Reader).ReadBytes,
                (*Reader).ReadSlice,
index 3f8d2a82a6e5665625668595541c8e80adb5b2bb..715ce071e3bb8113595620067ae11ee7a8834b99 100644 (file)
@@ -135,7 +135,7 @@ func (s *Scanner) Scan() bool {
                }
                // Must read more data.
                // First, shift data to beginning of buffer if there's lots of empty space
-               // or space is neded.
+               // or space is needed.
                if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) {
                        copy(s.buf, s.buf[s.start:s.end])
                        s.end -= s.start
index 4ac529fd6dd71ea797e13bfd4383424bd8201081..0db7cad2047545926756ac573a6720d5e37b275b 100644 (file)
@@ -277,7 +277,7 @@ func TestScanLineNoNewline(t *testing.T) {
        testNoNewline(text, lines, t)
 }
 
-// Test that the line splitter handles a final line with a carriage return but nonewline.
+// Test that the line splitter handles a final line with a carriage return but no newline.
 func TestScanLineReturnButNoNewline(t *testing.T) {
        const text = "abcdefghijklmn\nopqrstuvwxyz\r"
        lines := []string{
index cd647e5ae0048031b17d2f2331cf969a24475ada..727249dc46254cd5960efc6e9aeacf1c96b09fef 100644 (file)
@@ -177,7 +177,7 @@ const (
 
 var testfiles = []string{
        // Digits is the digits of the irrational number e. Its decimal representation
-       // does not repeat, but there are only 10 posible digits, so it should be
+       // does not repeat, but there are only 10 possible digits, so it should be
        // reasonably compressible.
        digits: "testdata/e.txt.bz2",
        // Twain is Project Gutenberg's edition of Mark Twain's classic English novel.
index bbe4c5a16fbc9aad762409c610d8233e0dd1f494..ce4923eca3738f6a00ed0ce99439534dafe0bf14 100644 (file)
@@ -54,7 +54,7 @@ func (e *WriteError) Error() string {
        return "flate: write error at offset " + strconv.FormatInt(e.Offset, 10) + ": " + e.Err.Error()
 }
 
-// Note that much of the implemenation of huffmanDecoder is also copied
+// Note that much of the implementation of huffmanDecoder is also copied
 // into gen.go (in package main) for the purpose of precomputing the
 // fixed huffman tables so they can be included statically.
 
index 2a8ebbc9438d5952eba84d2130c1f8c4970de7d0..a62ef741df336161397cc132cc4bec2ca656cfc1 100644 (file)
@@ -29,7 +29,7 @@ const (
 
 var testfiles = []string{
        // Digits is the digits of the irrational number e. Its decimal representation
-       // does not repeat, but there are only 10 posible digits, so it should be
+       // does not repeat, but there are only 10 possible digits, so it should be
        // reasonably compressible.
        digits: "../testdata/e.txt",
        // Twain is Project Gutenberg's edition of Mark Twain's classic English novel.
index cf9c832545554639bf1ec81384ca5bdf0bd90ce0..71ba81aaa764b5a471ae06a9b903692b4f3c1a1f 100644 (file)
@@ -120,7 +120,7 @@ func testFileLevelDictReset(t *testing.T, fn string, level int, dict []byte) {
        }
        out := buf.String()
 
-       // Reset and comprses again.
+       // Reset and compress again.
        buf2 := new(bytes.Buffer)
        zlibw.Reset(buf2)
        _, err = zlibw.Write(b0)
index cf174b6a21dbe8d4bd6b2e92bebc3d25f68158d8..d9957aec1d64f0f8b3ed72aeb1ae4f012124f325 100644 (file)
@@ -214,7 +214,7 @@ func SignPKCS1v15(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []b
 // hashed is the result of hashing the input message using the given hash
 // function and sig is the signature. A valid signature is indicated by
 // returning a nil error. If hash is zero then hashed is used directly. This
-// isn't advisable except for interopability.
+// isn't advisable except for interoperability.
 func VerifyPKCS1v15(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) (err error) {
        hashLen, prefix, err := pkcs1v15HashInfo(hash, len(hashed))
        if err != nil {
index f9abec39490052209649619c53ef4935b5314d80..18eafbc05f7cf547b4339fbe1f1840d0ae7613c8 100644 (file)
@@ -4,7 +4,7 @@
 
 package rsa
 
-// This file implementes the PSS signature scheme [1].
+// This file implements the PSS signature scheme [1].
 //
 // [1] http://www.rsa.com/rsalabs/pkcs/files/h11300-wp-pkcs-1v2-2-rsa-cryptography-standard.pdf
 
@@ -189,7 +189,7 @@ func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash hash.Hash) error {
 
 // signPSSWithSalt calculates the signature of hashed using PSS [1] with specified salt.
 // Note that hashed must be the result of hashing the input message using the
-// given hash funcion. salt is a random sequence of bytes whose length will be
+// given hash function. salt is a random sequence of bytes whose length will be
 // later used to verify the signature.
 func signPSSWithSalt(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed, salt []byte) (s []byte, err error) {
        nBits := priv.N.BitLen()
@@ -233,7 +233,7 @@ func (opts *PSSOptions) saltLength() int {
 
 // SignPSS calculates the signature of hashed using RSASSA-PSS [1].
 // Note that hashed must be the result of hashing the input message using the
-// given hash funcion. The opts argument may be nil, in which case sensible
+// given hash function. The opts argument may be nil, in which case sensible
 // defaults are used.
 func SignPSS(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte, opts *PSSOptions) (s []byte, err error) {
        saltLength := opts.saltLength()
index 550bc7f8fe5bd955a5daedf1296e648bae3fb89e..8f7d2c144ff23a9a56735ff88728b51494c07522 100644 (file)
@@ -82,7 +82,7 @@ func (c *Conn) SetReadDeadline(t time.Time) error {
        return c.conn.SetReadDeadline(t)
 }
 
-// SetWriteDeadline sets the write deadline on the underlying conneciton.
+// SetWriteDeadline sets the write deadline on the underlying connection.
 // A zero value for t means Write will not time out.
 // After a Write has timed out, the TLS state is corrupt and all future writes will return the same error.
 func (c *Conn) SetWriteDeadline(t time.Time) error {
index e891d4f4c4179d1ed87b68a104bd167e6087ca34..4874574c30b1be2d94af05307372bfb8b330b84b 100644 (file)
@@ -405,7 +405,7 @@ func (db *DB) removeDepLocked(x finalCloser, dep interface{}) func() error {
 // This value should be larger than the maximum typical value
 // used for db.maxOpen. If maxOpen is significantly larger than
 // connectionRequestQueueSize then it is possible for ALL calls into the *DB
-// to block until the connectionOpener can satify the backlog of requests.
+// to block until the connectionOpener can satisfy the backlog of requests.
 var connectionRequestQueueSize = 1000000
 
 // Open opens a database specified by its database driver name and a
@@ -778,7 +778,7 @@ func (db *DB) putConn(dc *driverConn, err error) {
 // connection limit will not be exceeded.
 // If err != nil, the value of dc is ignored.
 // If err == nil, then dc must not equal nil.
-// If a connRequest was fullfilled or the *driverConn was placed in the
+// If a connRequest was fulfilled or the *driverConn was placed in the
 // freeConn list, then true is returned, otherwise false is returned.
 func (db *DB) putConnDBLocked(dc *driverConn, err error) bool {
        if db.connRequests.Len() > 0 {
index a0a20df6f83600d757ee4e6e0ad37072907fc2a9..7971f149174391cf23ddf63b48ed4d988f644c47 100644 (file)
@@ -461,7 +461,7 @@ func TestTxStmt(t *testing.T) {
 }
 
 // Issue: http://golang.org/issue/2784
-// This test didn't fail before because we got luckly with the fakedb driver.
+// This test didn't fail before because we got lucky with the fakedb driver.
 // It was failing, and now not, in github.com/bradfitz/go-sql-test
 func TestTxQuery(t *testing.T) {
        db := newTestDB(t, "")
index 03e42b034657c049cb52fcac5cfdea96d547b68e..d622dae2af7984efac16c6994895809f99c7f74f 100644 (file)
@@ -517,7 +517,7 @@ const (
        DT_INIT_ARRAY   DynTag = 25 /* Address of the array of pointers to initialization functions */
        DT_FINI_ARRAY   DynTag = 26 /* Address of the array of pointers to termination functions */
        DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */
-       DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of terminationfunctions. */
+       DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */
        DT_RUNPATH      DynTag = 29 /* String table offset of a null-terminated library search path string. */
        DT_FLAGS        DynTag = 30 /* Object specific flag values. */
        DT_ENCODING     DynTag = 32 /* Values greater than or equal to DT_ENCODING
index 8af7d68d8bc7638c3af83397e0a291a4e7547f35..c95fe1e47f3e567755f62f07fa5ab1ce9a912a2a 100644 (file)
@@ -135,7 +135,7 @@ type SymID struct {
 
        // Version is zero for symbols with global visibility.
        // Symbols with only file visibility (such as file-level static
-       // declarations in C) have a non-zero version distinguising
+       // declarations in C) have a non-zero version distinguishing
        // a symbol in one file from a symbol of the same name
        // in another file
        Version int
index 6639ecc2944c7170e824601ef4d59fc24f8a17f1..9b6dab487cb6209e9b3e407dce9f90ce23bca372 100644 (file)
@@ -205,7 +205,7 @@ func (v *Map) Do(f func(KeyValue)) {
        v.doLocked(f)
 }
 
-// doRLocked calls f for each entry in the map.
+// doLocked calls f for each entry in the map.
 // v.mu must be held for reads.
 func (v *Map) doLocked(f func(KeyValue)) {
        for _, k := range v.keys {
index 6f5d244f8a7d13e267eecefddb6ee14e176d501a..02642d6ae775d6700e3448174cbf1d316893ec13 100644 (file)
@@ -82,7 +82,7 @@
        number of digits necessary to identify the value uniquely.
 
        For complex numbers, the width and precision apply to the two
-       components independently and the result is parenthsized, so %f applied
+       components independently and the result is parenthesized, so %f applied
        to 1.2+3.4i produces (1.200000+3.400000i).
 
        Other flags:
index b0f4ad4b73046915082888a306d5f9b67d8bcace..6c1c62575a766ca79531186bee708ab4f0aa3be4 100644 (file)
@@ -369,7 +369,7 @@ func (f *fmt) formatFloat(v float64, verb byte, prec, n int) {
        switch slice[1] {
        case '-', '+':
                // If we're zero padding, want the sign before the leading zeros.
-               // Achieve this by writing the sign out and padding the postive number.
+               // Achieve this by writing the sign out and padding the positive number.
                if f.zero && f.widPresent && f.wid > len(slice) {
                        f.buf.WriteByte(slice[1])
                        f.wid--
index 1fb4867dd28439382adf616714683ff489df738f..ac999d627cecbf739050e79a23ceaf40069dfa26 100644 (file)
@@ -149,7 +149,7 @@ func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) Com
 
        // set up comment reader r
        tmp := make([]*CommentGroup, len(comments))
-       copy(tmp, comments) // don't change incomming comments
+       copy(tmp, comments) // don't change incoming comments
        sortComments(tmp)
        r := commentListReader{fset: fset, list: tmp} // !r.eol() because len(comments) > 0
        r.next()
index f4ce9f654154247ed6e16eb3ace05593fe953880..c414e548ccd7524a1935d8b10d97418f3a28b025 100644 (file)
@@ -255,7 +255,7 @@ func playExample(file *ast.File, body *ast.BlockStmt) *ast.File {
                }
        }
 
-       // Strip "Output:" commment and adjust body end position.
+       // Strip "Output:" comment and adjust body end position.
        body, comments = stripOutputComment(body, comments)
 
        // Synthesize import declaration.
@@ -318,7 +318,7 @@ func playExampleFile(file *ast.File) *ast.File {
        return &f
 }
 
-// stripOutputComment finds and removes an "Output:" commment from body
+// stripOutputComment finds and removes an "Output:" comment from body
 // and comments, and adjusts the body block's end position.
 func stripOutputComment(body *ast.BlockStmt, comments []*ast.CommentGroup) (*ast.BlockStmt, []*ast.CommentGroup) {
        // Do nothing if no "Output:" comment found.
index 68eb3cd1e2b42b59a3da0c4bc40f57b75d9d5aa2..00dd532b2395e86e45fb8f24f4563e455d561a4a 100644 (file)
@@ -496,7 +496,7 @@ func syncDecl(p *parser) {
 // is valid to begin with, safePos returns pos. If pos is out-of-range,
 // safePos returns the EOF position.
 //
-// This is hack to work around "artifical" end positions in the AST which
+// This is hack to work around "artificial" end positions in the AST which
 // are computed by adding 1 to (presumably valid) token positions. If the
 // token positions are invalid due to parse errors, the resulting end position
 // may be past the file's EOF position, which would lead to panics if used
index 8454ac12b9e7e45afa45d52ef0b25dd782d5d83e..306928a69a26af9691dc2bcbe281263ecd3f1760 100644 (file)
@@ -63,7 +63,7 @@ func format(src []byte, mode checkMode) ([]byte, error) {
                return nil, fmt.Errorf("print: %s", err)
        }
 
-       // make sure formated output is syntactically correct
+       // make sure formatted output is syntactically correct
        res := buf.Bytes()
        if _, err := parser.ParseFile(fset, "", res, 0); err != nil {
                return nil, fmt.Errorf("re-parse: %s\n%s", err, buf.Bytes())
@@ -179,7 +179,7 @@ func check(t *testing.T, source, golden string, mode checkMode) {
                // test running past time out
                t.Errorf("%s: running too slowly", source)
        case <-cc:
-               // test finished within alloted time margin
+               // test finished within allotted time margin
        }
 }
 
@@ -212,7 +212,7 @@ func TestFiles(t *testing.T) {
        }
 }
 
-// TestLineComments, using a simple test case, checks that consequtive line
+// TestLineComments, using a simple test case, checks that consecutive line
 // comments are properly terminated with a newline even if the AST position
 // information is incorrect.
 //