From f3f5239d1e3e1acb299ef8a6a907df12713b9626 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 1 Feb 2012 16:19:36 -0800 Subject: [PATCH] all packages: fix various typos Detected semi-automatically. There are probably more. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5620046 --- src/cmd/api/goapi.go | 2 +- src/cmd/fix/fix.go | 2 +- src/cmd/fix/reflect.go | 2 +- src/cmd/yacc/yacc.go | 2 +- src/pkg/crypto/elliptic/p224.go | 4 ++-- src/pkg/encoding/gob/doc.go | 2 +- src/pkg/encoding/xml/typeinfo.go | 2 +- src/pkg/exp/ebnflint/doc.go | 2 +- src/pkg/exp/norm/forminfo.go | 2 +- src/pkg/go/doc/comment.go | 2 +- src/pkg/html/template/js.go | 2 +- src/pkg/net/interface_bsd.go | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index d05f90df3be..c8fc9cfae7f 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 d1a7bc8749a..2c1be6942a6 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 187d6c0a2d6..60bee166de7 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 c91a72123eb..e9422815219 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 87a6d556cea..17571c25288 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 05ebef19593..fce6879f56d 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 2bf2c6b3032..5475f290d18 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 f35976eea73..408227f71e1 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 d06a00602f8..b3b387b9b62 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 d73b1315954..e50cdd86e69 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 0e632df4220..a895a50aa90 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 907f80a80f3..62cd62b5ea4 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