]> Cypherpunks repositories - gostls13.git/commitdiff
pkg: spelling tweaks, A-H
authorRobert Hencke <robert.hencke@gmail.com>
Wed, 18 May 2011 17:14:56 +0000 (13:14 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 18 May 2011 17:14:56 +0000 (13:14 -0400)
R=ality, bradfitz, rsc, dsymonds, adg, qyzhai, dchest
CC=golang-dev
https://golang.org/cl/4536063

57 files changed:
src/pkg/asn1/asn1.go
src/pkg/asn1/common.go
src/pkg/asn1/marshal.go
src/pkg/big/nat.go
src/pkg/big/rat.go
src/pkg/compress/bzip2/bzip2.go
src/pkg/compress/bzip2/huffman.go
src/pkg/compress/flate/huffman_bit_writer.go
src/pkg/compress/gzip/gzip_test.go
src/pkg/container/heap/heap.go
src/pkg/crypto/elliptic/elliptic.go
src/pkg/crypto/elliptic/elliptic_test.go
src/pkg/crypto/hmac/hmac_test.go
src/pkg/crypto/openpgp/armor/armor.go
src/pkg/crypto/openpgp/packet/packet.go
src/pkg/crypto/openpgp/packet/public_key.go
src/pkg/crypto/openpgp/packet/signature.go
src/pkg/crypto/openpgp/read.go
src/pkg/crypto/openpgp/read_test.go
src/pkg/crypto/openpgp/s2k/s2k.go
src/pkg/crypto/rsa/rsa.go
src/pkg/crypto/subtle/constant_time_test.go
src/pkg/crypto/tls/common.go
src/pkg/crypto/tls/conn.go
src/pkg/crypto/tls/handshake_server.go
src/pkg/crypto/tls/key_agreement.go
src/pkg/crypto/x509/x509.go
src/pkg/crypto/xtea/block.go
src/pkg/crypto/xtea/xtea_test.go
src/pkg/debug/dwarf/type.go
src/pkg/debug/macho/file.go
src/pkg/debug/pe/file.go
src/pkg/debug/proc/proc_linux.go
src/pkg/encoding/git85/git.go
src/pkg/encoding/pem/pem.go
src/pkg/exp/datafmt/datafmt.go
src/pkg/exp/draw/x11/conn.go
src/pkg/exp/eval/expr.go
src/pkg/exp/eval/stmt.go
src/pkg/exp/eval/typec.go
src/pkg/exp/wingui/winapi.go
src/pkg/expvar/expvar_test.go
src/pkg/go/ast/ast.go
src/pkg/go/parser/parser.go
src/pkg/go/printer/nodes.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/testdata/comments.golden
src/pkg/go/printer/testdata/comments.input
src/pkg/go/scanner/scanner_test.go
src/pkg/go/token/position.go
src/pkg/gob/decode.go
src/pkg/gob/gobencdec_test.go
src/pkg/gob/type.go
src/pkg/html/token_test.go
src/pkg/http/chunked.go
src/pkg/http/persist.go
src/pkg/http/serve_test.go

index 5f470aed7970f3d3edd17c7191c7dc5e1fecb598..e7a46196cfa3b6bef5d1daf092b54b9c6a271a7b 100644 (file)
@@ -164,9 +164,9 @@ func (oi ObjectIdentifier) Equal(other ObjectIdentifier) bool {
        return true
 }
 
-// parseObjectIdentifier parses an OBJECT IDENTIFER from the given bytes and
-// returns it. An object identifer is a sequence of variable length integers
-// that are assigned in a hierarachy.
+// parseObjectIdentifier parses an OBJECT IDENTIFIER from the given bytes and
+// returns it. An object identifier is a sequence of variable length integers
+// that are assigned in a hierarchy.
 func parseObjectIdentifier(bytes []byte) (s []int, err os.Error) {
        if len(bytes) == 0 {
                err = SyntaxError{"zero length OBJECT IDENTIFIER"}
@@ -269,7 +269,7 @@ func isPrintable(b byte) bool {
                b == ':' ||
                b == '=' ||
                b == '?' ||
-               // This is techincally not allowed in a PrintableString.
+               // This is technically not allowed in a PrintableString.
                // However, x509 certificates with wildcard strings don't
                // always use the correct string type so we permit it.
                b == '*'
index 1589877477cf7ce6413aa47bee4cd211a95b9ad0..0e6abc46b88804bb59f17834b4a3d7ab732ba1f1 100644 (file)
@@ -10,7 +10,7 @@ import (
        "strings"
 )
 
-// ASN.1 objects have metadata preceeding them:
+// ASN.1 objects have metadata preceding them:
 //   the tag: the type of the object
 //   a flag denoting if this object is compound or not
 //   the class type: the namespace of the tag
index a3e1145b8956cc0965d91fe548d4a76adda86139..fc7c337f1ab09b05b7eae597f979c5c3cf9230f1 100644 (file)
@@ -351,7 +351,7 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter
                startingField := 0
 
                // If the first element of the structure is a non-empty
-               // RawContents, then we don't bother serialising the rest.
+               // RawContents, then we don't bother serializing the rest.
                if t.NumField() > 0 && t.Field(0).Type == rawContentsType {
                        s := v.Field(0)
                        if s.Len() > 0 {
@@ -361,7 +361,7 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter
                                }
                                /* The RawContents will contain the tag and
                                 * length fields but we'll also be writing
-                                * those outselves, so we strip them out of
+                                * those ourselves, so we strip them out of
                                 * bytes */
                                _, err = out.Write(stripTagAndLength(bytes))
                                return
index a5d8f223ab1effa4bf9ba57abd7078438e3a630f..87eb337d22ab57a8df9a26d754a015f9ef87cd9f 100755 (executable)
@@ -736,7 +736,7 @@ var deBruijn64Lookup = []byte{
 func trailingZeroBits(x Word) int {
        // x & -x leaves only the right-most bit set in the word. Let k be the
        // index of that bit. Since only a single bit is set, the value is two
-       // to the power of k. Multipling by a power of two is equivalent to
+       // to the power of k. Multiplying by a power of two is equivalent to
        // left shifting, in this case by k bits.  The de Bruijn constant is
        // such that all six bit, consecutive substrings are distinct.
        // Therefore, if we have a left shifted version of this constant we can
index 6b60be7e5db05968683e74d363864ccde584fb33..2adf316e648182d24432842455e9daf38e0d9370 100644 (file)
@@ -84,7 +84,7 @@ func (z *Rat) Num() *Int {
 }
 
 
-// Demom returns the denominator of z; it is always > 0.
+// Denom returns the denominator of z; it is always > 0.
 // The result is a reference to z's denominator; it
 // may change if a new value is assigned to z.
 func (z *Rat) Denom() *Int {
index 9e97edec17599fe8c2bf01ae4d253d00f8cf00a2..8b4572306b17842fc4491a29fa7ea0796ac585b5 100644 (file)
@@ -284,7 +284,7 @@ func (bz2 *reader) readBlock() (err os.Error) {
        repeat := 0
        repeat_power := 0
 
-       // The `C' array (used by the inverse BWT) needs to be zero initialised.
+       // The `C' array (used by the inverse BWT) needs to be zero initialized.
        for i := range bz2.c {
                bz2.c[i] = 0
        }
@@ -330,7 +330,7 @@ func (bz2 *reader) readBlock() (err os.Error) {
 
                if int(v) == numSymbols-1 {
                        // This is the EOF symbol. Because it's always at the
-                       // end of the move-to-front list, and nevers gets moved
+                       // end of the move-to-front list, and never gets moved
                        // to the front, it has this unique value.
                        break
                }
index 732bc4a21da1617a1773504f2a2178686ff0be3d..dc05739c7559b9583e74c2af093c7fd50777bb66 100644 (file)
@@ -68,7 +68,7 @@ func newHuffmanTree(lengths []uint8) (huffmanTree, os.Error) {
        // each symbol (consider reflecting a tree down the middle, for
        // example). Since the code length assignments determine the
        // efficiency of the tree, each of these trees is equally good. In
-       // order to minimise the amount of information needed to build a tree
+       // order to minimize the amount of information needed to build a tree
        // bzip2 uses a canonical tree so that it can be reconstructed given
        // only the code length assignments.
 
index abff82dd694bd21fff203132b3524c652aca428e..5df4510a204af4f396e6d67d7c4774cbab2361c1 100644 (file)
@@ -185,7 +185,7 @@ func (w *huffmanBitWriter) writeBytes(bytes []byte) {
        _, w.err = w.w.Write(bytes)
 }
 
-// RFC 1951 3.2.7 specifies a special run-length encoding for specifiying
+// RFC 1951 3.2.7 specifies a special run-length encoding for specifying
 // the literal and offset lengths arrays (which are concatenated into a single
 // array).  This method generates that run-length encoding.
 //
@@ -279,7 +279,7 @@ func (w *huffmanBitWriter) writeCode(code *huffmanEncoder, literal uint32) {
 //
 //  numLiterals  The number of literals specified in codegen
 //  numOffsets   The number of offsets specified in codegen
-//  numCodegens  Tne number of codegens used in codegen
+//  numCodegens  The number of codegens used in codegen
 func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, numCodegens int, isEof bool) {
        if w.err != nil {
                return
index 23f35140556aeb9a68471868f116386293cc6d0a..121e627e6b234f98de3ae0b867adde1fd3522aea 100644 (file)
@@ -11,7 +11,7 @@ import (
 )
 
 // pipe creates two ends of a pipe that gzip and gunzip, and runs dfunc at the
-// writer end and ifunc at the reader end.
+// writer end and cfunc at the reader end.
 func pipe(t *testing.T, dfunc func(*Compressor), cfunc func(*Decompressor)) {
        piper, pipew := io.Pipe()
        defer piper.Close()
index f2b8a750a45c16ee18b3fed854f7df4ae1623d33..5b68827df01b3f8454440c613fa1dc65f9f16dee 100644 (file)
@@ -22,7 +22,7 @@ type Interface interface {
 }
 
 
-// A heaper must be initialized before any of the heap operations
+// A heap must be initialized before any of the heap operations
 // can be used. Init is idempotent with respect to the heap invariants
 // and may be called whenever the heap invariants may have been invalidated.
 // Its complexity is O(n) where n = h.Len().
index 335c9645dc6ab56c1bb59b46df838191d9d05315..41835f1a9c8729ad1a24413d3acefde4b694548f 100644 (file)
@@ -284,7 +284,7 @@ func (curve *Curve) Marshal(x, y *big.Int) []byte {
        return ret
 }
 
-// Unmarshal converts a point, serialised by Marshal, into an x, y pair. On
+// Unmarshal converts a point, serialized by Marshal, into an x, y pair. On
 // error, x = nil.
 func (curve *Curve) Unmarshal(data []byte) (x, y *big.Int) {
        byteLen := (curve.BitSize + 7) >> 3
index 02083a986668cb58952d9183fe7677d26146f8e1..b7e7f035fa56c7521c0052c4f275a52f3150efbc 100644 (file)
@@ -321,8 +321,8 @@ func TestMarshal(t *testing.T) {
                t.Error(err)
                return
        }
-       serialised := p224.Marshal(x, y)
-       xx, yy := p224.Unmarshal(serialised)
+       serialized := p224.Marshal(x, y)
+       xx, yy := p224.Unmarshal(serialized)
        if xx == nil {
                t.Error("failed to unmarshal")
                return
index 40adbad0408f56e165287afb53987e5edb1d691e..bcae63b8af84e3a2e919d7261e819349e047a35e 100644 (file)
@@ -190,7 +190,7 @@ func TestHMAC(t *testing.T) {
                                continue
                        }
 
-                       // Repetive Sum() calls should return the same value
+                       // Repetitive Sum() calls should return the same value
                        for k := 0; k < 2; k++ {
                                sum := fmt.Sprintf("%x", h.Sum())
                                if sum != tt.out {
index 8da612c500777233d8717ce47afaea45257af492..9c4180d6d6d54d0ed3425665bf9c8f78d44df51f 100644 (file)
@@ -153,7 +153,7 @@ func (r *openpgpReader) Read(p []byte) (n int, err os.Error) {
 
 // Decode reads a PGP armored block from the given Reader. It will ignore
 // leading garbage. If it doesn't find a block, it will return nil, os.EOF. The
-// given Reader is not usable after calling this function: an arbitary amount
+// given Reader is not usable after calling this function: an arbitrary amount
 // of data may have been read past the end of the block.
 func Decode(in io.Reader) (p *Block, err os.Error) {
        r, _ := bufio.NewReaderSize(in, 100)
index 1c8a07139890919063baefede4138e2c21a17117..e583670fb2dc9df46b502d5da75a98caa8a0f330 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.
 
-// Package packet implements parsing and serialisation of OpenPGP packets, as
+// Package packet implements parsing and serialization of OpenPGP packets, as
 // specified in RFC 4880.
 package packet
 
@@ -386,7 +386,7 @@ func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err os.Error) {
        return
 }
 
-// mpiLength returns the length of the given *big.Int when serialised as an
+// mpiLength returns the length of the given *big.Int when serialized as an
 // MPI.
 func mpiLength(n *big.Int) (mpiLengthInBytes int) {
        mpiLengthInBytes = 2 /* MPI length */
index 24eab49f586eeab08cc35ece6dbc540ec92612eb..b0ecfe39475a7dab0aedb2c21253f470f4f9e0d9 100644 (file)
@@ -293,7 +293,7 @@ type parsedMPI struct {
        bitLength uint16
 }
 
-// writeMPIs is a utility function for serialising several big integers to the
+// writeMPIs is a utility function for serializing several big integers to the
 // given Writer.
 func writeMPIs(w io.Writer, mpis ...parsedMPI) (err os.Error) {
        for _, mpi := range mpis {
index 39c68619e5f0e5df7ce336f7d3be51ffd6f2b6db..0dee47c6fb979e2fdcc4c712f560c6bd333b3908 100644 (file)
@@ -393,7 +393,7 @@ func (sig *Signature) buildHashSuffix() (err os.Error) {
        sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash)
        if !ok {
                sig.HashSuffix = nil
-               return error.InvalidArgumentError("hash cannot be repesented in OpenPGP: " + strconv.Itoa(int(sig.Hash)))
+               return error.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash)))
        }
        sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8)
        sig.HashSuffix[5] = byte(hashedSubpacketsLen)
index 4f84dff82bb95b7eacbf2f096260521386542d49..46fcde3630a23b71b0e08c94119f8e41b569dc02 100644 (file)
@@ -44,7 +44,7 @@ type MessageDetails struct {
        DecryptedWith            Key                 // the private key used to decrypt the message, if any.
        IsSigned                 bool                // true if the message is signed.
        SignedByKeyId            uint64              // the key id of the signer, if any.
-       SignedBy                 *Key                // the key of the signer, if availible.
+       SignedBy                 *Key                // the key of the signer, if available.
        LiteralData              *packet.LiteralData // the metadata of the contents
        UnverifiedBody           io.Reader           // the contents of the message.
 
@@ -145,7 +145,7 @@ ParsePackets:
        // function so that it can decrypt a key or give us a passphrase.
 FindKey:
        for {
-               // See if any of the keys already have a private key availible
+               // See if any of the keys already have a private key available
                candidates = candidates[:0]
                candidateFingerprints := make(map[string]bool)
 
@@ -214,7 +214,7 @@ FindKey:
        return readSignedMessage(packets, md, keyring)
 }
 
-// readSignedMessage reads a possibily signed message if mdin is non-zero then
+// readSignedMessage reads a possibly signed message if mdin is non-zero then
 // that structure is updated and returned. Otherwise a fresh MessageDetails is
 // used.
 func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err os.Error) {
@@ -274,13 +274,13 @@ FindLiteralData:
 
 // hashForSignature returns a pair of hashes that can be used to verify a
 // signature. The signature may specify that the contents of the signed message
-// should be preprocessed (i.e. to normalise line endings). Thus this function
+// should be preprocessed (i.e. to normalize line endings). Thus this function
 // returns two hashes. The second should be used to hash the message itself and
 // performs any needed preprocessing.
 func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, os.Error) {
        h := hashId.New()
        if h == nil {
-               return nil, nil, error.UnsupportedError("hash not availible: " + strconv.Itoa(int(hashId)))
+               return nil, nil, error.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId)))
        }
 
        switch sigType {
index 423c85b0f27b969e686c5c3d793ef390e73eadab..a040b5b1b501960bf878a6d41a5812c91aa3b365 100644 (file)
@@ -193,9 +193,9 @@ func TestSymmetricallyEncrypted(t *testing.T) {
                t.Errorf("ReadAll: %s", err)
        }
 
-       expectedCreatationTime := uint32(1295992998)
-       if md.LiteralData.Time != expectedCreatationTime {
-               t.Errorf("LiteralData.Time is %d, want %d", md.LiteralData.Time, expectedCreatationTime)
+       expectedCreationTime := uint32(1295992998)
+       if md.LiteralData.Time != expectedCreationTime {
+               t.Errorf("LiteralData.Time is %d, want %d", md.LiteralData.Time, expectedCreationTime)
        }
 
        if string(contents) != expected {
index 93b7582fa06a5feb033ee5ca630102c64147ddf3..80b81bd3a5a7fa2ba67a506f012a1848a50ec490 100644 (file)
@@ -90,7 +90,7 @@ func Parse(r io.Reader) (f func(out, in []byte), err os.Error) {
        }
        h := hash.New()
        if h == nil {
-               return nil, error.UnsupportedError("hash not availible: " + strconv.Itoa(int(hash)))
+               return nil, error.UnsupportedError("hash not available: " + strconv.Itoa(int(hash)))
        }
 
        switch buf[0] {
index e1813dbf938f9fb7d26b9467c1f5a6e98bab2b6e..c702ab1c0e13b4ed2c2f0d26a184c6a48aadc6d0 100644 (file)
@@ -94,7 +94,7 @@ type PrivateKey struct {
        Primes    []*big.Int // prime factors of N, has >= 2 elements.
 
        // Precomputed contains precomputed values that speed up private
-       // operations, if availible.
+       // operations, if available.
        Precomputed PrecomputedValues
 }
 
@@ -417,7 +417,7 @@ func decrypt(rand io.Reader, priv *PrivateKey, c *big.Int) (m *big.Int, err os.E
                // Blinding enabled. Blinding involves multiplying c by r^e.
                // Then the decryption operation performs (m^e * r^e)^d mod n
                // which equals mr mod n. The factor of r can then be removed
-               // by multipling by the multiplicative inverse of r.
+               // by multiplying by the multiplicative inverse of r.
 
                var r *big.Int
 
index b28b7358105197f9ef6e22ee59ec2c70691a6b09..adab8e2e8ddedab229a483e51cb4dff5f004be0a 100644 (file)
@@ -14,14 +14,14 @@ type TestConstantTimeCompareStruct struct {
        out  int
 }
 
-var testConstandTimeCompareData = []TestConstantTimeCompareStruct{
+var testConstantTimeCompareData = []TestConstantTimeCompareStruct{
        {[]byte{}, []byte{}, 1},
        {[]byte{0x11}, []byte{0x11}, 1},
        {[]byte{0x12}, []byte{0x11}, 0},
 }
 
 func TestConstantTimeCompare(t *testing.T) {
-       for i, test := range testConstandTimeCompareData {
+       for i, test := range testConstantTimeCompareData {
                if r := ConstantTimeCompare(test.a, test.b); r != test.out {
                        t.Errorf("#%d bad result (got %x, want %x)", i, r, test.out)
                }
index 0b26aae84d1429da4b7a8670a2bc69e572be053e..3efac9c13b087a97623d14782ecbf42a217fb2aa 100644 (file)
@@ -87,7 +87,7 @@ const (
        certTypeRSASign    = 1 // A certificate containing an RSA key
        certTypeDSSSign    = 2 // A certificate containing a DSA key
        certTypeRSAFixedDH = 3 // A certificate containing a static DH key
-       certTypeDSSFixedDH = 4 // A certficiate containing a static DH key
+       certTypeDSSFixedDH = 4 // A certificate containing a static DH key
        // Rest of these are reserved by the TLS spec
 )
 
index 48d3f725b49c62179ac42761dc5c13b51259776c..097e182bda3f3875dcfdc0215055a3f8486eb35c 100644 (file)
@@ -34,7 +34,7 @@ type Conn struct {
        cipherSuite       uint16
        ocspResponse      []byte // stapled OCSP response
        peerCertificates  []*x509.Certificate
-       // verifedChains contains the certificate chains that we built, as
+       // verifiedChains contains the certificate chains that we built, as
        // opposed to the ones presented by the server.
        verifiedChains [][]*x509.Certificate
 
@@ -237,7 +237,7 @@ func (hc *halfConn) decrypt(b *block) (bool, alert) {
                        // "Password Interception in a SSL/TLS Channel", Brice
                        // Canvel et al.
                        //
-                       // However, our behaviour matches OpenSSL, so we leak
+                       // However, our behavior matches OpenSSL, so we leak
                        // only as much as they do.
                default:
                        panic("unknown cipher type")
@@ -410,7 +410,7 @@ func (hc *halfConn) freeBlock(b *block) {
 
 // splitBlock splits a block after the first n bytes,
 // returning a block with those n bytes and a
-// block with the remaindec.  the latter may be nil.
+// block with the remainder.  the latter may be nil.
 func (hc *halfConn) splitBlock(b *block, n int) (*block, *block) {
        if len(b.data) <= n {
                return b, nil
index 37c8d154ac4dc47955308bf0ad41d91ab2e8b4e2..e9431c6fad841550f40fefe3e434f928ae6e5756 100644 (file)
@@ -209,10 +209,10 @@ FindCipherSuite:
 
        // If we received a client cert in response to our certificate request message,
        // the client will send us a certificateVerifyMsg immediately after the
-       // clientKeyExchangeMsg.  This message is a MD5SHA1 digest of all preceeding
+       // clientKeyExchangeMsg.  This message is a MD5SHA1 digest of all preceding
        // handshake-layer messages that is signed using the private key corresponding
        // to the client's certificate. This allows us to verify that the client is in
-       // posession of the private key of the certificate.
+       // possession of the private key of the certificate.
        if len(c.peerCertificates) > 0 {
                msg, err = c.readHandshake()
                if err != nil {
index 8edbb11900c5f1dfa2b8f2db9b08c67d46cafc2e..84f90c45a0433902217edfd7b53dbc842b574d6b 100644 (file)
@@ -236,12 +236,12 @@ func (ka *ecdheRSAKeyAgreement) generateClientKeyExchange(config *Config, client
        xBytes := x.Bytes()
        copy(preMasterSecret[len(preMasterSecret)-len(xBytes):], xBytes)
 
-       serialised := ka.curve.Marshal(mx, my)
+       serialized := ka.curve.Marshal(mx, my)
 
        ckx := new(clientKeyExchangeMsg)
-       ckx.ciphertext = make([]byte, 1+len(serialised))
-       ckx.ciphertext[0] = byte(len(serialised))
-       copy(ckx.ciphertext[1:], serialised)
+       ckx.ciphertext = make([]byte, 1+len(serialized))
+       ckx.ciphertext[0] = byte(len(serialized))
+       copy(ckx.ciphertext[1:], serialized)
 
        return preMasterSecret, ckx, nil
 }
index ef912a2b40cb51b28f2e31a783d5239ba56efa53..f82e5e83cb885a21730d47c644f2859d3b9d552e 100644 (file)
@@ -33,10 +33,10 @@ type pkcs1PrivateKey struct {
        Dq   asn1.RawValue "optional"
        Qinv asn1.RawValue "optional"
 
-       AdditionalPrimes []pkcs1AddtionalRSAPrime "optional"
+       AdditionalPrimes []pkcs1AdditionalRSAPrime "optional"
 }
 
-type pkcs1AddtionalRSAPrime struct {
+type pkcs1AdditionalRSAPrime struct {
        Prime asn1.RawValue
 
        // We ignore these values because rsa will calculate them.
@@ -135,7 +135,7 @@ func MarshalPKCS1PrivateKey(key *rsa.PrivateKey) []byte {
                Qinv:    rawValueForBig(key.Precomputed.Qinv),
        }
 
-       priv.AdditionalPrimes = make([]pkcs1AddtionalRSAPrime, len(key.Precomputed.CRTValues))
+       priv.AdditionalPrimes = make([]pkcs1AdditionalRSAPrime, len(key.Precomputed.CRTValues))
        for i, values := range key.Precomputed.CRTValues {
                priv.AdditionalPrimes[i].Prime = rawValueForBig(key.Primes[2+i])
                priv.AdditionalPrimes[i].Exp = rawValueForBig(values.Exp)
@@ -280,7 +280,7 @@ var (
        oidOrganizationalUnit = []int{2, 5, 4, 11}
        oidCommonName         = []int{2, 5, 4, 3}
        oidSerialNumber       = []int{2, 5, 4, 5}
-       oidLocatity           = []int{2, 5, 4, 7}
+       oidLocality           = []int{2, 5, 4, 7}
        oidProvince           = []int{2, 5, 4, 8}
        oidStreetAddress      = []int{2, 5, 4, 9}
        oidPostalCode         = []int{2, 5, 4, 17}
@@ -308,7 +308,7 @@ func (n Name) toRDNSequence() (ret rdnSequence) {
        ret = appendRDNs(ret, n.Country, oidCountry)
        ret = appendRDNs(ret, n.Organization, oidOrganization)
        ret = appendRDNs(ret, n.OrganizationalUnit, oidOrganizationalUnit)
-       ret = appendRDNs(ret, n.Locality, oidLocatity)
+       ret = appendRDNs(ret, n.Locality, oidLocality)
        ret = appendRDNs(ret, n.Province, oidProvince)
        ret = appendRDNs(ret, n.StreetAddress, oidStreetAddress)
        ret = appendRDNs(ret, n.PostalCode, oidPostalCode)
@@ -680,13 +680,13 @@ func parseCertificate(in *certificate) (*Certificate, os.Error) {
                                }
                        case 19:
                                // RFC 5280, 4.2.1.9
-                               var constriants basicConstraints
-                               _, err := asn1.Unmarshal(e.Value, &constriants)
+                               var constraints basicConstraints
+                               _, err := asn1.Unmarshal(e.Value, &constraints)
 
                                if err == nil {
                                        out.BasicConstraintsValid = true
-                                       out.IsCA = constriants.IsCA
-                                       out.MaxPathLen = constriants.MaxPathLen
+                                       out.IsCA = constraints.IsCA
+                                       out.MaxPathLen = constraints.MaxPathLen
                                        continue
                                }
                        case 17:
index 3ac36d038f85cd6c2fc3746dcb85bc5a0dc1a849..bf5d245992d99dfba447c1b4e52b811a7e7653a6 100644 (file)
@@ -22,7 +22,7 @@ func blockToUint32(src []byte) (uint32, uint32) {
        return r0, r1
 }
 
-// uint32ToBlock writes two unint32s into an 8 byte data block.
+// uint32ToBlock writes two uint32s into an 8 byte data block.
 // Values are written as big endian.
 func uint32ToBlock(v0, v1 uint32, dst []byte) {
        dst[0] = byte(v0 >> 24)
index 03934f1695edf17d425c99b710135bdf5928e518..217d96adc2099756981bbfc75a306b8a54144d30 100644 (file)
@@ -8,7 +8,7 @@ import (
        "testing"
 )
 
-// A sample test key for when we just want to initialise a cipher
+// A sample test key for when we just want to initialize a cipher
 var testKey = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}
 
 // Test that the block size for XTEA is correct
@@ -26,12 +26,12 @@ func TestBlocksize(t *testing.T) {
 
        result := c.BlockSize()
        if result != 8 {
-               t.Errorf("BlockSize function - expected 8, gotr %d", result)
+               t.Errorf("BlockSize function - expected 8, got %d", result)
                return
        }
 }
 
-// A series of test values to confirm that the Cipher.table array was initialised correctly
+// A series of test values to confirm that the Cipher.table array was initialized correctly
 var testTable = []uint32{
        0x00112233, 0x6B1568B8, 0xE28CE030, 0xC5089E2D, 0xC5089E2D, 0x1EFBD3A2, 0xA7845C2A, 0x78EF0917,
        0x78EF0917, 0x172682D0, 0x5B6AC714, 0x822AC955, 0x3DE68511, 0xDC1DFECA, 0x2062430E, 0x3611343F,
@@ -43,7 +43,7 @@ var testTable = []uint32{
        0x4E22726F, 0x309E306C, 0x309E306C, 0x8A9165E1, 0x1319EE69, 0xF595AC66, 0xF595AC66, 0x4F88E1DB,
 }
 
-// Test that the cipher context is initialised correctly
+// Test that the cipher context is initialized correctly
 func TestCipherInit(t *testing.T) {
        c, err := NewCipher(testKey)
        if err != nil {
@@ -53,7 +53,7 @@ func TestCipherInit(t *testing.T) {
 
        for i := 0; i < len(c.table); i++ {
                if c.table[i] != testTable[i] {
-                       t.Errorf("NewCipher() failed to initialise Cipher.table[%d] correctly. Expected %08X, got %08X", i, testTable[i], c.table[i])
+                       t.Errorf("NewCipher() failed to initialize Cipher.table[%d] correctly. Expected %08X, got %08X", i, testTable[i], c.table[i])
                        break
                }
        }
index 902a545f860dd517ffe75189f5fdf714cd97e6db..f9acf119f396b66ad9cf6f86972dbdb7cf6a82eb 100644 (file)
@@ -523,7 +523,7 @@ func (d *Data) Type(off Offset) (Type, os.Error) {
                // Attributes:
                //      AttrType: type of return value if any
                //      AttrName: possible name of type [ignored]
-               //      AttrPrototyped: whether used ANSI C prototye [ignored]
+               //      AttrPrototyped: whether used ANSI C prototype [ignored]
                // Children:
                //      TagFormalParameter: typed parameter
                //              AttrType: type of parameter
index a777d873cf2cd2e47eb90e9683e81d7545c2fae3..721a4c4168d6a74c30e4a83f85ae267eb3edd547 100644 (file)
@@ -184,7 +184,7 @@ func (f *File) Close() os.Error {
        return err
 }
 
-// NewFile creates a new File for acecssing a Mach-O binary in an underlying reader.
+// NewFile creates a new File for accessing a Mach-O binary in an underlying reader.
 // The Mach-O binary is expected to start at position 0 in the ReaderAt.
 func NewFile(r io.ReaderAt) (*File, os.Error) {
        f := new(File)
index 6a14e50f9609b8da4be68f8170aa8a82860b27db..04991f781bedb261c58136f8842aebfab75af497 100644 (file)
@@ -112,7 +112,7 @@ func (f *File) Close() os.Error {
        return err
 }
 
-// NewFile creates a new File for acecssing a PE binary in an underlying reader.
+// NewFile creates a new File for accessing a PE binary in an underlying reader.
 func NewFile(r io.ReaderAt) (*File, os.Error) {
        f := new(File)
        sr := io.NewSectionReader(r, 0, 1<<63-1)
index 17c8fa529f53aad2cb85d62bb57c8819962a77c9..153c3e99b75d90f1972653f5b6fe197a5178a5c8 100644 (file)
@@ -277,7 +277,7 @@ func (t *thread) ptraceDetach() os.Error {
 }
 
 /*
- * Logging utilties
+ * Logging utilities
  */
 
 var logLock sync.Mutex
@@ -1192,7 +1192,7 @@ func (p *process) attachAllThreads() os.Error {
 
        // We stop threads as we attach to them; however, because new
        // threads can appear while we're looping over all of them, we
-       // have to repeatly scan until we know we're attached to all
+       // have to repeatedly scan until we know we're attached to all
        // of them.
        for again := true; again; {
                again = false
@@ -1214,7 +1214,7 @@ func (p *process) attachAllThreads() os.Error {
                        _, err = p.attachThread(tid)
                        if err != nil {
                                // There could have been a race, or
-                               // this process could be a zobmie.
+                               // this process could be a zombie.
                                statFile, err2 := ioutil.ReadFile(taskPath + "/" + tidStr + "/stat")
                                if err2 != nil {
                                        switch err2 := err2.(type) {
index 09a45cd3c706921f70027817d93a6a4e25b8c568..6bb74f46c86a8b4cccb5b4a269abcc18335ddad9 100644 (file)
@@ -273,5 +273,5 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) {
                d.nbuf = copy(d.buf[0:], d.buf[nl+1:d.nbuf])
                d.off += int64(nl + 1)
        }
-       panic("unreacahable")
+       panic("unreachable")
 }
index 44e3d0ad0949e9ee98da0216edccad246b6adb88..c2398807fccf818c6ad2e8b90832396f288bafde 100644 (file)
@@ -140,7 +140,7 @@ Error:
        // any lines which could be header lines. However, a valid preamble
        // line is not a valid header line, therefore we cannot have consumed
        // the preamble line for the any subsequent block. Thus, we will always
-       // find any valid block, no matter what bytes preceed it.
+       // find any valid block, no matter what bytes precede it.
        //
        // For example, if the input is
        //
index a8efdc58fe9ec1759818334f76624d6d141b51cf..10e4b54f9438604c91b7b923e133e42320f3e3c4 100644 (file)
@@ -594,7 +594,7 @@ func (s *State) eval(fexpr expr, value reflect.Value, index int) bool {
                s.eval(t.indent, value, index)
                // if the indentation evaluates to nil, the state's output buffer
                // didn't change - either way it's ok to append the difference to
-               // the current identation
+               // the current indentation
                s.indent.Write(s.output.Bytes()[mark.outputLen:s.output.Len()])
                s.restore(mark)
 
index 81c67267db64ebc820fed0588b9db603bd5e19f1..23edc2c631deceaf7a28136bed2bee7c0f2d5068 100644 (file)
@@ -310,7 +310,7 @@ func authenticate(w *bufio.Writer, displayStr string) os.Error {
                return os.NewError("unsupported Xauth")
        }
        // 0x006c means little-endian. 0x000b, 0x0000 means X major version 11, minor version 0.
-       // 0x0012 and 0x0010 means the auth key and value have lenths 18 and 16.
+       // 0x0012 and 0x0010 means the auth key and value have lengths 18 and 16.
        // The final 0x0000 is padding, so that the string length is a multiple of 4.
        _, err = io.WriteString(w, "\x6c\x00\x0b\x00\x00\x00\x12\x00\x10\x00\x00\x00")
        if err != nil {
@@ -517,7 +517,7 @@ func (c *conn) handshake() os.Error {
        if err != nil {
                return err
        }
-       // Ignore some things that we don't care about (totalling 10 + vendorLen bytes):
+       // Ignore some things that we don't care about (totaling 10 + vendorLen bytes):
        // imageByteOrder(1), bitmapFormatBitOrder(1), bitmapFormatScanlineUnit(1) bitmapFormatScanlinePad(1),
        // minKeycode(1), maxKeycode(1), padding(4), vendor (vendorLen).
        if 10+int(vendorLen) > cap(c.buf) {
index e65f47617bdcd7b2964cc0088bdd2349be5e82e7..14a0659b604dcaa180e0c57d4424baa09756ffb5 100644 (file)
@@ -1781,7 +1781,7 @@ func (a *exprInfo) compileBinaryExpr(op token.Token, l, r *expr) *expr {
                // written: Function values are equal if they were
                // created by the same execution of a function literal
                // or refer to the same function declaration.  This is
-               // *almost* but not quite waht 6g implements.  If a
+               // *almost* but not quite what 6g implements.  If a
                // function literals does not capture any variables,
                // then multiple executions of it will result in the
                // same closure.  Russ says he'll change that.
index f6b7c1cda941ac4ef4798a7cbefb9f9f42064d63..57bf20e6fcabb921b741063b0880e98ba2171df2 100644 (file)
@@ -68,7 +68,7 @@ type flowBuf struct {
        gotos map[token.Pos]*flowBlock
        // labels is a map from label name to information on the block
        // at the point of the label.  labels are tracked by name,
-       // since mutliple labels at the same PC can have different
+       // since multiple labels at the same PC can have different
        // blocks.
        labels map[string]*flowBlock
 }
@@ -307,7 +307,7 @@ func (a *stmtCompiler) compile(s ast.Stmt) {
        }
 
        if notimpl {
-               a.diag("%T statment node not implemented", s)
+               a.diag("%T statement node not implemented", s)
        }
 
        if a.block.inner != nil {
@@ -550,7 +550,7 @@ func (a *stmtCompiler) doAssign(lhs []ast.Expr, rhs []ast.Expr, tok token.Token,
                        ident, ok = le.(*ast.Ident)
                        if !ok {
                                a.diagAt(le.Pos(), "left side of := must be a name")
-                               // Suppress new defitions errors
+                               // Suppress new definitions errors
                                nDefs++
                                continue
                        }
index de90cf66496761e2d8310a34d3d0455da17702df..0ed24a8d27cd5051118e76085979b2ab849568f9 100644 (file)
@@ -68,7 +68,7 @@ func (a *typeCompiler) compileArrayType(x *ast.ArrayType, allowRec bool) Type {
        }
 
        if _, ok := x.Len.(*ast.Ellipsis); ok {
-               a.diagAt(x.Len.Pos(), "... array initailizers not implemented")
+               a.diagAt(x.Len.Pos(), "... array initializers not implemented")
                return nil
        }
        l, ok := a.compileArrayLen(a.block, x.Len)
index c96f452999f8c362e7692084ea7125e77828824c..fb0d610097cfa0f44438ac5f05a478741673beed 100644 (file)
@@ -96,7 +96,7 @@ const (
        // Some button control styles
        BS_DEFPUSHBUTTON = 1
 
-       // Some colour constants
+       // Some color constants
        COLOR_WINDOW  = 5
        COLOR_BTNFACE = 15
 
@@ -108,13 +108,13 @@ const (
 )
 
 var (
-       // Some globaly known cusrors
+       // Some globally known cursors
        IDC_ARROW = MakeIntResource(32512)
        IDC_IBEAM = MakeIntResource(32513)
        IDC_WAIT  = MakeIntResource(32514)
        IDC_CROSS = MakeIntResource(32515)
 
-       // Some globaly known icons
+       // Some globally known icons
        IDI_APPLICATION = MakeIntResource(32512)
        IDI_HAND        = MakeIntResource(32513)
        IDI_QUESTION    = MakeIntResource(32514)
index 94926d9f8ce045f921c2e62995b2e63d0eab5483..8f7a48168eaa61b05df3f36f6d52cde371fbfad4 100644 (file)
@@ -76,33 +76,33 @@ func TestString(t *testing.T) {
 }
 
 func TestMapCounter(t *testing.T) {
-       colours := NewMap("bike-shed-colours")
+       colors := NewMap("bike-shed-colors")
 
-       colours.Add("red", 1)
-       colours.Add("red", 2)
-       colours.Add("blue", 4)
-       colours.AddFloat("green", 4.125)
-       if x := colours.m["red"].(*Int).i; x != 3 {
-               t.Errorf("colours.m[\"red\"] = %v, want 3", x)
+       colors.Add("red", 1)
+       colors.Add("red", 2)
+       colors.Add("blue", 4)
+       colors.AddFloat("green", 4.125)
+       if x := colors.m["red"].(*Int).i; x != 3 {
+               t.Errorf("colors.m[\"red\"] = %v, want 3", x)
        }
-       if x := colours.m["blue"].(*Int).i; x != 4 {
-               t.Errorf("colours.m[\"blue\"] = %v, want 4", x)
+       if x := colors.m["blue"].(*Int).i; x != 4 {
+               t.Errorf("colors.m[\"blue\"] = %v, want 4", x)
        }
-       if x := colours.m["green"].(*Float).f; x != 4.125 {
-               t.Errorf("colours.m[\"green\"] = %v, want 3.14", x)
+       if x := colors.m["green"].(*Float).f; x != 4.125 {
+               t.Errorf("colors.m[\"green\"] = %v, want 3.14", x)
        }
 
-       // colours.String() should be '{"red":3, "blue":4}',
+       // colors.String() should be '{"red":3, "blue":4}',
        // though the order of red and blue could vary.
-       s := colours.String()
+       s := colors.String()
        var j interface{}
        err := json.Unmarshal([]byte(s), &j)
        if err != nil {
-               t.Errorf("colours.String() isn't valid JSON: %v", err)
+               t.Errorf("colors.String() isn't valid JSON: %v", err)
        }
        m, ok := j.(map[string]interface{})
        if !ok {
-               t.Error("colours.String() didn't produce a map.")
+               t.Error("colors.String() didn't produce a map.")
        }
        red := m["red"]
        x, ok := red.(float64)
index 31602ec8500af3a3d6ecbcec0535d480f1149635..b1c7d4ab1cfd43181789dc9743e48f63cd44a453 100644 (file)
@@ -515,10 +515,10 @@ type (
 
        // An EmptyStmt node represents an empty statement.
        // The "position" of the empty statement is the position
-       // of the immediately preceeding semicolon.
+       // of the immediately preceding semicolon.
        //
        EmptyStmt struct {
-               Semicolon token.Pos // position of preceeding ";"
+               Semicolon token.Pos // position of preceding ";"
        }
 
        // A LabeledStmt node represents a labeled statement.
@@ -596,7 +596,7 @@ type (
        // An IfStmt node represents an if statement.
        IfStmt struct {
                If   token.Pos // position of "if" keyword
-               Init Stmt      // initalization statement; or nil
+               Init Stmt      // initialization statement; or nil
                Cond Expr      // condition
                Body *BlockStmt
                Else Stmt // else branch; or nil
@@ -613,7 +613,7 @@ type (
        // A SwitchStmt node represents an expression switch statement.
        SwitchStmt struct {
                Switch token.Pos  // position of "switch" keyword
-               Init   Stmt       // initalization statement; or nil
+               Init   Stmt       // initialization statement; or nil
                Tag    Expr       // tag expression; or nil
                Body   *BlockStmt // CaseClauses only
        }
@@ -621,7 +621,7 @@ type (
        // An TypeSwitchStmt node represents a type switch statement.
        TypeSwitchStmt struct {
                Switch token.Pos  // position of "switch" keyword
-               Init   Stmt       // initalization statement; or nil
+               Init   Stmt       // initialization statement; or nil
                Assign Stmt       // x := y.(type) or y.(type)
                Body   *BlockStmt // CaseClauses only
        }
@@ -643,7 +643,7 @@ type (
        // A ForStmt represents a for statement.
        ForStmt struct {
                For  token.Pos // position of "for" keyword
-               Init Stmt      // initalization statement; or nil
+               Init Stmt      // initialization statement; or nil
                Cond Expr      // condition; or nil
                Post Stmt      // post iteration statement; or nil
                Body *BlockStmt
index da1e0390b62c930d43cad3addafb3d022c3b34e2..586ee3a9a449a529764f57556b49c6aa670f924f 100644 (file)
@@ -54,7 +54,7 @@ type parser struct {
        // Non-syntactic parser control
        exprLev int // < 0: in control clause, >= 0: in expression
 
-       // Ordinary identifer scopes
+       // Ordinary identifier scopes
        pkgScope   *ast.Scope        // pkgScope.Outer == nil
        topScope   *ast.Scope        // top-most scope; may be pkgScope
        unresolved []*ast.Ident      // unresolved identifiers
index 3b504bd2c5306f36fb6e758f622e7f45ced554c0..6657cbb92e626ebd5d36915226f271d11869a457 100644 (file)
@@ -33,7 +33,7 @@ import (
 // line break was printed; returns false otherwise.
 //
 // TODO(gri): linebreak may add too many lines if the next statement at "line"
-//            is preceeded by comments because the computation of n assumes
+//            is preceded by comments because the computation of n assumes
 //            the current position before the comment and the target position
 //            after the comment. Thus, after interspersing such comments, the
 //            space taken up by them is not considered to reduce the number of
@@ -438,7 +438,7 @@ func (p *printer) fieldList(fields *ast.FieldList, isStruct, isIncomplete bool)
                        if len(list) > 0 {
                                p.print(formfeed)
                        }
-                       p.flush(p.fset.Position(rbrace), token.RBRACE) // make sure we don't loose the last line comment
+                       p.flush(p.fset.Position(rbrace), token.RBRACE) // make sure we don't lose the last line comment
                        p.setLineComment("// contains filtered or unexported fields")
                }
 
@@ -465,7 +465,7 @@ func (p *printer) fieldList(fields *ast.FieldList, isStruct, isIncomplete bool)
                        if len(list) > 0 {
                                p.print(formfeed)
                        }
-                       p.flush(p.fset.Position(rbrace), token.RBRACE) // make sure we don't loose the last line comment
+                       p.flush(p.fset.Position(rbrace), token.RBRACE) // make sure we don't lose the last line comment
                        p.setLineComment("// contains filtered or unexported methods")
                }
 
@@ -1390,7 +1390,7 @@ func (p *printer) nodeSize(n ast.Node, maxSize int) (size int) {
        size = maxSize + 1 // assume n doesn't fit
        p.nodeSizes[n] = size
 
-       // nodeSize computation must be indendent of particular
+       // nodeSize computation must be independent of particular
        // style so that we always get the same decision; print
        // in RawFormat
        cfg := Config{Mode: RawFormat}
index 01ebf783c416525c5f0a537024669ffabe405a2e..40b15dd79b7e4da120e76eb876c071b9604e47c9 100644 (file)
@@ -589,7 +589,7 @@ func (p *printer) writeCommentSuffix(needsLinebreak bool) (droppedFF bool) {
                        // ignore trailing whitespace
                        p.wsbuf[i] = ignore
                case indent, unindent:
-                       // don't loose indentation information
+                       // don't lose indentation information
                case newline, formfeed:
                        // if we need a line break, keep exactly one
                        // but remember if we dropped any formfeeds
index 334098759cb0b4f5cc9edda1bf4f7b9f4afd2f04..b177c357198a82246e2855b64ba4a8caaefaece3 100644 (file)
@@ -436,7 +436,7 @@ func _() {
 
 
 // Comments immediately adjacent to punctuation (for which the go/printer
-// may obly have estimated position information) must remain after the punctuation.
+// may only have estimated position information) must remain after the punctuation.
 func _() {
        _ = T{
                1,      // comment after comma
index 14cd4cf7a12e01eb20ccc4c656ff28fefcb0ae33..2a9a86b681584c2748ea58fcf97a9dc4dbf859a1 100644 (file)
@@ -434,7 +434,7 @@ func _() {
 
 
 // Comments immediately adjacent to punctuation (for which the go/printer
-// may obly have estimated position information) must remain after the punctuation.
+// may only have estimated position information) must remain after the punctuation.
 func _() {
        _ = T{
                1,    // comment after comma
index 8afb00ee5bc6dc57f9e7393919a809845619ddc4..2d56bfb2527b1fe033d1bbf148459b91d5cefd1b 100644 (file)
@@ -89,7 +89,7 @@ var tokens = [...]elt{
                literal,
        },
 
-       // Operators and delimitors
+       // Operators and delimiters
        {token.ADD, "+", operator},
        {token.SUB, "-", operator},
        {token.MUL, "*", operator},
index 8c35eeb52f77afa63f43c89009f27708962d6cb8..23a3cc00fb99e1f583ff6bfa59893c302a0f97ab 100644 (file)
@@ -135,7 +135,7 @@ func (f *File) position(p Pos) (pos Position) {
 func (s *FileSet) Position(p Pos) (pos Position) {
        if p != NoPos {
                // TODO(gri) consider optimizing the case where p
-               //           is in the last file addded, or perhaps
+               //           is in the last file added, or perhaps
                //           looked at - will eliminate one level
                //           of search
                s.mutex.RLock()
index 0e86df6b57a27936f8ffa6e87422759723d8f48e..381d44c05a079c3fa3a775fde657ff196b0c1ae2 100644 (file)
@@ -172,7 +172,7 @@ func ignoreTwoUints(i *decInstr, state *decoderState, p unsafe.Pointer) {
        state.decodeUint()
 }
 
-// decBool decodes a uiint and stores it as a boolean through p.
+// decBool decodes a uint and stores it as a boolean through p.
 func decBool(i *decInstr, state *decoderState, p unsafe.Pointer) {
        if i.indir > 0 {
                if *(*unsafe.Pointer)(p) == nil {
index e94534f4c333ba7250e9d36ef1ad1b216631a2d7..3e1906020f00148362c82a860af470bdc54b2fa2 100644 (file)
@@ -384,7 +384,7 @@ func TestGobEncoderFieldTypeError(t *testing.T) {
        y := &GobTest1{}
        err = dec.Decode(y)
        if err == nil {
-               t.Fatal("expected decode error for mistmatched fields (non-encoder to decoder)")
+               t.Fatal("expected decode error for mismatched fields (non-encoder to decoder)")
        }
        if strings.Index(err.String(), "type") < 0 {
                t.Fatal("expected type error; got", err)
index c5b8fb5d9d13fdd53cb5c6987c1fa7bc8119c50b..c6542633a6cc94c0075513bf20319476e975956c 100644 (file)
@@ -673,7 +673,7 @@ func mustGetTypeInfo(rt reflect.Type) *typeInfo {
 // A type that implements GobEncoder and GobDecoder has complete
 // control over the representation of its data and may therefore
 // contain things such as private fields, channels, and functions,
-// which are not usually transmissable in gob streams.
+// which are not usually transmissible in gob streams.
 //
 // Note: Since gobs can be stored permanently, It is good design
 // to guarantee the encoding used by a GobEncoder is stable as the
index e474c92812549965d2fdc249eb753b5fa19db5f0..6291af600579d2d534fcbd18e250b554eca7614e 100644 (file)
@@ -100,7 +100,7 @@ var tokenTests = []tokenTest{
                "<p \t\n iD=\"a&quot;B\"  foo=\"bar\"><EM>te&lt;&amp;;xt</em></p>",
                `<p id="a&quot;B" foo="bar">$<em>$te&lt;&amp;;xt$</em>$</p>`,
        },
-       // A non-existant entity. Tokenizing and converting back to a string should
+       // A nonexistent entity. Tokenizing and converting back to a string should
        // escape the "&" to become "&amp;".
        {
                "noSuchEntity",
index 66195f06b966d19485489012aebdf363852bdbd9..bfd68a44085c1ad50e814145f38f243b9a6fd113 100644 (file)
@@ -18,7 +18,7 @@ func NewChunkedWriter(w io.Writer) io.WriteCloser {
 }
 
 // Writing to ChunkedWriter translates to writing in HTTP chunked Transfer
-// Encoding wire format to the undering Wire writer.
+// Encoding wire format to the underlying Wire writer.
 type chunkedWriter struct {
        Wire io.Writer
 }
index 4eb4ab0cdf653ced3aff57ff658b3a582b771b0d..62f9ff1b54070104fe2da6c5bc0a629f90106741 100644 (file)
@@ -111,7 +111,7 @@ func (sc *ServerConn) Read() (req *Request, err os.Error) {
        // Make sure body is fully consumed, even if user does not call body.Close
        if lastbody != nil {
                // body.Close is assumed to be idempotent and multiple calls to
-               // it should return the error that its first invokation
+               // it should return the error that its first invocation
                // returned.
                err = lastbody.Close()
                if err != nil {
index 8c91983b2a144ad55ef542efe7238be15a3097c2..60d41edf3dcd80a7493d1e97fe463778fe3c668e 100644 (file)
@@ -551,7 +551,7 @@ var serverExpectTests = []serverExpectTest{
        {100, "", true, "200 OK"},
 
        // 100-continue but requesting client to deny us,
-       // so it never eads the body.
+       // so it never reads the body.
        {100, "100-continue", false, "401 Unauthorized"},
        // Likewise without 100-continue:
        {100, "", false, "401 Unauthorized"},