1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:30:13 -06:00

all packages: fix various typos

Detected semi-automatically. There are probably more.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5620046
This commit is contained in:
Robert Griesemer 2012-02-01 16:19:36 -08:00
parent 5cc07af675
commit f3f5239d1e
12 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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 != "" {

View File

@ -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 {

View File

@ -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