From: Robert Griesemer Date: Thu, 2 Feb 2012 00:19:36 +0000 (-0800) Subject: all packages: fix various typos X-Git-Tag: weekly.2012-02-07~136 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f3f5239d1e3e1acb299ef8a6a907df12713b9626;p=gostls13.git all packages: fix various typos Detected semi-automatically. There are probably more. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5620046 --- diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index d05f90df3b..c8fc9cfae7 100644 --- a/src/cmd/api/goapi.go +++ b/src/cmd/api/goapi.go @@ -119,7 +119,7 @@ type Walker struct { lastConstType string curPackageName string curPackage *ast.Package - prevConstType map[string]string // identifer -> "ideal-int" + prevConstType map[string]string // identifier -> "ideal-int" packageState map[string]loadState interfaces map[pkgSymbol]*ast.InterfaceType selectorFullPkg map[string]string // "http" => "net/http", updated by imports diff --git a/src/cmd/fix/fix.go b/src/cmd/fix/fix.go index d1a7bc8749..2c1be6942a 100644 --- a/src/cmd/fix/fix.go +++ b/src/cmd/fix/fix.go @@ -704,7 +704,7 @@ func rewriteImport(f *ast.File, oldPath, newPath string) (rewrote bool) { for _, imp := range f.Imports { if importPath(imp) == oldPath { rewrote = true - // record old End, beacuse the default is to compute + // record old End, because the default is to compute // it using the length of imp.Path.Value. imp.EndPos = imp.End() imp.Path.Value = strconv.Quote(newPath) diff --git a/src/cmd/fix/reflect.go b/src/cmd/fix/reflect.go index 187d6c0a2d..60bee166de 100644 --- a/src/cmd/fix/reflect.go +++ b/src/cmd/fix/reflect.go @@ -49,7 +49,7 @@ http://codereview.appspot.com/4433066 // // Not all type checks result in a single Kind check. The rewrite of the type check for // reflect.ArrayOrSliceType checks x.Kind() against reflect.Array and reflect.Slice. -// The rewrite for *reflect.IntType checks againt Int, Int8, Int16, Int32, Int64. +// The rewrite for *reflect.IntType checks against Int, Int8, Int16, Int32, Int64. // The rewrite for *reflect.UintType adds Uintptr. // // A type switch turns into an assignment and a switch on Kind: diff --git a/src/cmd/yacc/yacc.go b/src/cmd/yacc/yacc.go index c91a72123e..e942281521 100644 --- a/src/cmd/yacc/yacc.go +++ b/src/cmd/yacc/yacc.go @@ -545,7 +545,7 @@ outer: // put into prdptr array in the format // target // followed by id's of terminals and non-terminals - // followd by -nprod + // followed by -nprod for t != MARK && t != ENDFILE { mem := 0 diff --git a/src/pkg/crypto/elliptic/p224.go b/src/pkg/crypto/elliptic/p224.go index 87a6d556ce..17571c2528 100644 --- a/src/pkg/crypto/elliptic/p224.go +++ b/src/pkg/crypto/elliptic/p224.go @@ -225,7 +225,7 @@ func p224ReduceLarge(out *p224FieldElement, in *p224LargeFieldElement) { in[i] += p224ZeroModP63[i] } - // Elimintate the coefficients at 2**224 and greater. + // Eliminate the coefficients at 2**224 and greater. for i := 14; i >= 8; i-- { in[i-8] -= in[i] in[i-5] += (in[i] & 0xffff) << 12 @@ -288,7 +288,7 @@ func p224Reduce(a *p224FieldElement) { a[0] += mask & (1 << 28) } -// p224Invert calcuates *out = in**-1 by computing in**(2**224 - 2**96 - 1), +// p224Invert calculates *out = in**-1 by computing in**(2**224 - 2**96 - 1), // i.e. Fermat's little theorem. func p224Invert(out, in *p224FieldElement) { var f1, f2, f3, f4 p224FieldElement diff --git a/src/pkg/encoding/gob/doc.go b/src/pkg/encoding/gob/doc.go index 05ebef1959..fce6879f56 100644 --- a/src/pkg/encoding/gob/doc.go +++ b/src/pkg/encoding/gob/doc.go @@ -70,7 +70,7 @@ operation will fail. Structs, arrays and slices are also supported. Strings and arrays of bytes are supported with a special, efficient representation (see below). When a slice is decoded, if the existing slice has capacity the slice will be extended in place; -if not, a new array is allocated. Regardless, the length of the resuling slice +if not, a new array is allocated. Regardless, the length of the resulting slice reports the number of elements decoded. Functions and channels cannot be sent in a gob. Attempting diff --git a/src/pkg/encoding/xml/typeinfo.go b/src/pkg/encoding/xml/typeinfo.go index 2bf2c6b303..5475f290d1 100644 --- a/src/pkg/encoding/xml/typeinfo.go +++ b/src/pkg/encoding/xml/typeinfo.go @@ -193,7 +193,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro // If the field type has an XMLName field, the names must match // so that the behavior of both marshalling and unmarshalling - // is straighforward and unambiguous. + // is straightforward and unambiguous. if finfo.flags&fElement != 0 { ftyp := f.Type xmlname := lookupXMLName(ftyp) diff --git a/src/pkg/exp/ebnflint/doc.go b/src/pkg/exp/ebnflint/doc.go index f35976eea7..408227f71e 100644 --- a/src/pkg/exp/ebnflint/doc.go +++ b/src/pkg/exp/ebnflint/doc.go @@ -4,7 +4,7 @@ /* -Ebnflint verifies that EBNF productions are consistent and gramatically correct. +Ebnflint verifies that EBNF productions are consistent and grammatically correct. It reads them from an HTML document such as the Go specification. Grammar productions are grouped in boxes demarcated by the HTML elements diff --git a/src/pkg/exp/norm/forminfo.go b/src/pkg/exp/norm/forminfo.go index d06a00602f..b3b387b9b6 100644 --- a/src/pkg/exp/norm/forminfo.go +++ b/src/pkg/exp/norm/forminfo.go @@ -111,7 +111,7 @@ func (r runeInfo) isInert() bool { // Wrappers for tables.go -// The 16-bit value of the decompostion tries is an index into a byte +// The 16-bit value of the decomposition tries is an index into a byte // array of UTF-8 decomposition sequences. The first byte is the number // of bytes in the decomposition (excluding this length byte). The actual // sequence starts at the offset+1. diff --git a/src/pkg/go/doc/comment.go b/src/pkg/go/doc/comment.go index d73b131595..e50cdd86e6 100644 --- a/src/pkg/go/doc/comment.go +++ b/src/pkg/go/doc/comment.go @@ -336,7 +336,7 @@ func blocks(text string) []block { if lastWasBlank && !lastWasHeading && i+2 < len(lines) && isBlank(lines[i+1]) && !isBlank(lines[i+2]) && indentLen(lines[i+2]) == 0 { - // current line is non-blank, sourounded by blank lines + // current line is non-blank, surrounded by blank lines // and the next non-blank line is not indented: this // might be a heading. if head := heading(line); head != "" { diff --git a/src/pkg/html/template/js.go b/src/pkg/html/template/js.go index 0e632df422..a895a50aa9 100644 --- a/src/pkg/html/template/js.go +++ b/src/pkg/html/template/js.go @@ -154,7 +154,7 @@ func jsValEscaper(args ...interface{}) string { a = fmt.Sprint(args...) } // TODO: detect cycles before calling Marshal which loops infinitely on - // cyclic data. This may be an unnacceptable DoS risk. + // cyclic data. This may be an unacceptable DoS risk. b, err := json.Marshal(a) if err != nil { diff --git a/src/pkg/net/interface_bsd.go b/src/pkg/net/interface_bsd.go index 907f80a80f..62cd62b5ea 100644 --- a/src/pkg/net/interface_bsd.go +++ b/src/pkg/net/interface_bsd.go @@ -15,7 +15,7 @@ import ( ) // If the ifindex is zero, interfaceTable returns mappings of all -// network interfaces. Otheriwse it returns a mapping of a specific +// network interfaces. Otherwise it returns a mapping of a specific // interface. func interfaceTable(ifindex int) ([]Interface, error) { var ift []Interface