diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index a62c87421032c1bcd1237aeb3f1a895c74078b7c..4bde794a1314f410fccb12092317d29c67bfe1b2 100644 --- a/src/cmd/api/goapi.go +++ b/src/cmd/api/goapi.go @@ -817,7 +817,7 @@ func (w *Walker) emitFunc(f *types.Func) { func (w *Walker) emitMethod(m *types.Selection) { sig := m.Type().(*types.Signature) recv := sig.Recv().Type() - // report exported methods with unexported reveiver base type + // report exported methods with unexported receiver base type if true { base := recv if p, _ := recv.(*types.Pointer); p != nil { diff --git a/src/cmd/go/clean.go b/src/cmd/go/clean.go index 16687f72f700f48ea92fbc78fc064dfa8bf9b67c..30a17b87a011a1f85357e5406c6e8dd2b39dc00d 100644 --- a/src/cmd/go/clean.go +++ b/src/cmd/go/clean.go @@ -153,7 +153,7 @@ func clean(p *Package) { elem+".test.exe", ) - // Remove a potental executable for each .go file in the directory that + // Remove a potential executable for each .go file in the directory that // is not part of the directory's package. for _, dir := range dirs { name := dir.Name() diff --git a/src/cmd/go/get.go b/src/cmd/go/get.go index e61da7e2ad270a6b8be698fcbfcaac89c4868a1e..c4217fe24c5d313f2104f9b0d0bccd1ffc1f0d5b 100644 --- a/src/cmd/go/get.go +++ b/src/cmd/go/get.go @@ -73,7 +73,7 @@ func runGet(cmd *Command, args []string) { } exitIfErrors() - // Phase 2. Rescan packages and reevaluate args list. + // Phase 2. Rescan packages and re-evaluate args list. // Code we downloaded and all code that depends on it // needs to be evicted from the package cache so that diff --git a/src/pkg/container/heap/heap.go b/src/pkg/container/heap/heap.go index 3fe2327ad2dab76673edc1b63e6a1eb07d5b9d6c..c467a11910c9f5e395d30c75c7078fbdcf53c574 100644 --- a/src/pkg/container/heap/heap.go +++ b/src/pkg/container/heap/heap.go @@ -78,7 +78,7 @@ func Remove(h Interface, i int) interface{} { return h.Pop() } -// Fix reestablishes the heap ordering after the element at index i has changed its value. +// Fix re-establishes the heap ordering after the element at index i has changed its value. // Changing the value of the element at index i and then calling Fix is equivalent to, // but less expensive than, calling Remove(h, i) followed by a Push of the new value. // The complexity is O(log(n)) where n = h.Len(). diff --git a/src/pkg/crypto/tls/key_agreement.go b/src/pkg/crypto/tls/key_agreement.go index 94bb5e99e752ae469953c56dd66a59fa4078f13e..f38b701f1bab5a6a8fbb64d2a2375f9ccd404930 100644 --- a/src/pkg/crypto/tls/key_agreement.go +++ b/src/pkg/crypto/tls/key_agreement.go @@ -141,7 +141,7 @@ func hashForServerKeyExchange(sigType, hashFunc uint8, version uint16, slices .. // pickTLS12HashForSignature returns a TLS 1.2 hash identifier for signing a // ServerKeyExchange given the signature type being used and the client's -// advertized list of supported signature and hash combinations. +// advertised list of supported signature and hash combinations. func pickTLS12HashForSignature(sigType uint8, clientSignatureAndHashes []signatureAndHash) (uint8, error) { if len(clientSignatureAndHashes) == 0 { // If the client didn't specify any signature_algorithms diff --git a/src/pkg/math/big/rat.go b/src/pkg/math/big/rat.go index 0fd19c6124bfbded341246107661b8f8619ab4df..f0973b3902f19a4f89c3bc6a55f83272d0f6ec14 100644 --- a/src/pkg/math/big/rat.go +++ b/src/pkg/math/big/rat.go @@ -47,7 +47,7 @@ func (z *Rat) SetFloat64(f float64) *Rat { shift := 52 - exp - // Optimisation (?): partially pre-normalise. + // Optimization (?): partially pre-normalise. for mantissa&1 == 0 && shift > 0 { mantissa >>= 1 shift-- diff --git a/src/pkg/math/cmplx/pow.go b/src/pkg/math/cmplx/pow.go index 81821a3ff6a5272310797f39163a0521c11f77b4..1630b879b88b0dbc97c4d5ef16a1815f40c66953 100644 --- a/src/pkg/math/cmplx/pow.go +++ b/src/pkg/math/cmplx/pow.go @@ -43,7 +43,7 @@ import "math" // IEEE -10,+10 30000 9.4e-15 1.5e-15 // Pow returns x**y, the base-x exponential of y. -// For generalized compatiblity with math.Pow: +// For generalized compatibility with math.Pow: // Pow(0, ±0) returns 1+0i // Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i. func Pow(x, y complex128) complex128 { diff --git a/src/pkg/net/http/fs.go b/src/pkg/net/http/fs.go index 9df5cc481897d98ac628b23252bcee0c0a910510..8576cf844a3ca412e4e1a6e296ef90bdea95699a 100644 --- a/src/pkg/net/http/fs.go +++ b/src/pkg/net/http/fs.go @@ -527,7 +527,7 @@ func (w *countingWriter) Write(p []byte) (n int, err error) { return len(p), nil } -// rangesMIMESize returns the nunber of bytes it takes to encode the +// rangesMIMESize returns the number of bytes it takes to encode the // provided ranges as a multipart response. func rangesMIMESize(ranges []httpRange, contentType string, contentSize int64) (encSize int64) { var w countingWriter diff --git a/src/pkg/net/ipsock.go b/src/pkg/net/ipsock.go index 8b586ef7c3e5d472b3de333cb6ce874712135c64..dda857803082fae372c1297f084f7849c2e7b0a9 100644 --- a/src/pkg/net/ipsock.go +++ b/src/pkg/net/ipsock.go @@ -16,7 +16,7 @@ var ( // networking functionality. supportsIPv4 bool - // supportsIPv6 reports whether the platfrom supports IPv6 + // supportsIPv6 reports whether the platform supports IPv6 // networking functionality. supportsIPv6 bool @@ -207,7 +207,7 @@ missingBrackets: } func splitHostZone(s string) (host, zone string) { - // The IPv6 scoped addressing zone identifer starts after the + // The IPv6 scoped addressing zone identifier starts after the // last percent sign. if i := last(s, '%'); i > 0 { host, zone = s[:i], s[i+1:] @@ -232,7 +232,7 @@ func JoinHostPort(host, port string) string { // address or a DNS name and returns an internet protocol family // address. It returns a list that contains a pair of different // address family addresses when addr is a DNS name and the name has -// mutiple address family records. The result contains at least one +// multiple address family records. The result contains at least one // address when error is nil. func resolveInternetAddr(net, addr string, deadline time.Time) (netaddr, error) { var ( diff --git a/src/pkg/net/sendfile_dragonfly.go b/src/pkg/net/sendfile_dragonfly.go index a2219c163374f4eebc1fd30b971f12b287f33191..bc88fd3b907aa7fb7791f166ac065ce17ff6e637 100644 --- a/src/pkg/net/sendfile_dragonfly.go +++ b/src/pkg/net/sendfile_dragonfly.go @@ -23,7 +23,7 @@ const maxSendfileSize int = 4 << 20 // if handled == false, sendFile performed no work. func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) { // DragonFly uses 0 as the "until EOF" value. If you pass in more bytes than the - // file contains, it will loop back to the beginning ad nauseum until it's sent + // file contains, it will loop back to the beginning ad nauseam until it's sent // exactly the number of bytes told to. As such, we need to know exactly how many // bytes to send. var remain int64 = 0 diff --git a/src/pkg/net/sendfile_freebsd.go b/src/pkg/net/sendfile_freebsd.go index 42fe799efbd0e68e5cc54fd50ee480bba652cb03..ffc147262a8def15b616f2b57e8a31ab73c31bc1 100644 --- a/src/pkg/net/sendfile_freebsd.go +++ b/src/pkg/net/sendfile_freebsd.go @@ -23,7 +23,7 @@ const maxSendfileSize int = 4 << 20 // if handled == false, sendFile performed no work. func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) { // FreeBSD uses 0 as the "until EOF" value. If you pass in more bytes than the - // file contains, it will loop back to the beginning ad nauseum until it's sent + // file contains, it will loop back to the beginning ad nauseam until it's sent // exactly the number of bytes told to. As such, we need to know exactly how many // bytes to send. var remain int64 = 0 diff --git a/src/pkg/regexp/syntax/prog.go b/src/pkg/regexp/syntax/prog.go index c4563ae752c96e1631c44ed1208afbc90ebd821d..089b90db11e80d82f30cdcfefe3c721d9e1717c5 100644 --- a/src/pkg/regexp/syntax/prog.go +++ b/src/pkg/regexp/syntax/prog.go @@ -597,7 +597,7 @@ func (p runeSlice) Sort() { // makeOnePass creates a onepass Prog, if possible. It is possible if at any alt, // the match engine can always tell which branch to take. The routine may modify // p if it is turned into a onepass Prog. If it isn't possible for this to be a -// onepass Prog, the Prog syntax.NotOnePass is returned. makeOnePass is resursive +// onepass Prog, the Prog syntax.NotOnePass is returned. makeOnePass is recursive // to the size of the Prog func (p *Prog) makeOnePass() *Prog { var ( diff --git a/src/pkg/runtime/pprof/pprof.go b/src/pkg/runtime/pprof/pprof.go index 98080457cb581e14a3e4b8bbfcb70f0263eb727a..26aa0b8be5cf0fc5f12fcbc082b0d42d5daa2133 100644 --- a/src/pkg/runtime/pprof/pprof.go +++ b/src/pkg/runtime/pprof/pprof.go @@ -20,7 +20,7 @@ import ( "text/tabwriter" ) -// BUG(rsc): Profiles are incomplete and inaccuate on NetBSD and OS X. +// BUG(rsc): Profiles are incomplete and inaccurate on NetBSD and OS X. // See http://golang.org/issue/6047 for details. // A Profile is a collection of stack traces showing the call sequences diff --git a/src/pkg/sort/sort.go b/src/pkg/sort/sort.go index 242c5fffa217e2af515283f5eec189e192cde647..e980c295c32f61b8bafdf9761943ea71d5554989 100644 --- a/src/pkg/sort/sort.go +++ b/src/pkg/sort/sort.go @@ -287,7 +287,7 @@ func StringsAreSorted(a []string) bool { return IsSorted(StringSlice(a)) } // Notes on stable sorting: // The used algorithms are simple and provable correct on all input and use // only logarithmic additional stack space. They perform well if compared -// experimentaly to other stable in-place sorting algorithms. +// experimentally to other stable in-place sorting algorithms. // // Remarks on other algorithms evaluated: // - GCC's 4.6.3 stable_sort with merge_without_buffer from libstdc++: diff --git a/src/pkg/syscall/dir_plan9.go b/src/pkg/syscall/dir_plan9.go index d9fb26b133f1e7c3acc39afd87a37584518ba72e..697bf5499c35c04e667e89a00d2e5a2d54a70e94 100644 --- a/src/pkg/syscall/dir_plan9.go +++ b/src/pkg/syscall/dir_plan9.go @@ -54,7 +54,7 @@ var nullDir = Dir{ } // Null assigns special "don't touch" values to members of d to -// avoid modifiying them during syscall.Wstat. +// avoid modifying them during syscall.Wstat. func (d *Dir) Null() { *d = nullDir } // Marshal encodes a 9P stat message corresponding to d into b diff --git a/src/pkg/syscall/fd_nacl.go b/src/pkg/syscall/fd_nacl.go index cbc8315e44aeb0b4c80c79cdb4e955eaba35494e..19cd98acb13d43586d52321618035ff8b457bb9c 100644 --- a/src/pkg/syscall/fd_nacl.go +++ b/src/pkg/syscall/fd_nacl.go @@ -194,7 +194,7 @@ func Seek(fd int, offset int64, whence int) (int64, error) { return f.impl.seek(offset, whence) } -// defaulFileImpl imlements fileImpl. +// defaulFileImpl implements fileImpl. // It can be embedded to complete a partial fileImpl implementation. type defaultFileImpl struct{} diff --git a/src/pkg/syscall/mksyscall_windows.go b/src/pkg/syscall/mksyscall_windows.go index 0fd1c3c05a13f2a01439c69585fa0afcb2ea93ff..4225588de7126e6115e15dde4cce48f54b70029b 100644 --- a/src/pkg/syscall/mksyscall_windows.go +++ b/src/pkg/syscall/mksyscall_windows.go @@ -135,7 +135,7 @@ func (p *Param) TmpVarCode() string { } // SyscallArgList returns source code fragments representing p parameter -// in syscall. Slices are transated into 2 syscall parameters: pointer to +// in syscall. Slices are translated into 2 syscall parameters: pointer to // the first element and length. func (p *Param) SyscallArgList() []string { var s string @@ -321,7 +321,7 @@ func extractParams(s string, f *Fn) ([]*Param, error) { // extractSection extracts text out of string s starting after start // and ending just before end. found return value will indicate success, -// and prefix, body and sufix will contain correspondent parts of string s. +// and prefix, body and suffix will contain correspondent parts of string s. func extractSection(s string, start, end rune) (prefix, body, suffix string, found bool) { s = trim(s) if strings.HasPrefix(s, string(start)) { @@ -617,7 +617,7 @@ func main() { } } -// TODO: use println instead to print in the folowing template +// TODO: use println instead to print in the following template const srcTemplate = ` {{define "main"}}// go build mksyscall_windows.go && ./mksyscall_windows{{range .Files}} {{.}}{{end}} diff --git a/src/pkg/syscall/route_dragonfly.go b/src/pkg/syscall/route_dragonfly.go index acad7a2be8fe1bc1b7264bb2250c3da89ff5f0f7..79190d2b01b27b5af285c8293f0268474e185f13 100644 --- a/src/pkg/syscall/route_dragonfly.go +++ b/src/pkg/syscall/route_dragonfly.go @@ -30,7 +30,7 @@ func (any *anyMessage) toRoutingMessage(b []byte) RoutingMessage { } // InterfaceAnnounceMessage represents a routing message containing -// network interface arrival and depature information. +// network interface arrival and departure information. type InterfaceAnnounceMessage struct { Header IfAnnounceMsghdr } diff --git a/src/pkg/syscall/route_freebsd.go b/src/pkg/syscall/route_freebsd.go index eba6752b7b6c3f3b1c03c6521137036c22d7cb0c..15897b1aca9476f19cbb2350ec47a8fd5be2b3bf 100644 --- a/src/pkg/syscall/route_freebsd.go +++ b/src/pkg/syscall/route_freebsd.go @@ -36,7 +36,7 @@ func (any *anyMessage) toRoutingMessage(b []byte) RoutingMessage { } // InterfaceAnnounceMessage represents a routing message containing -// network interface arrival and depature information. +// network interface arrival and departure information. type InterfaceAnnounceMessage struct { Header IfAnnounceMsghdr } diff --git a/src/pkg/syscall/route_netbsd.go b/src/pkg/syscall/route_netbsd.go index a6baa02f80256de6c13439b8b00fe7d8793686aa..9883aebaf5f556509bc316e24554ec020404df68 100644 --- a/src/pkg/syscall/route_netbsd.go +++ b/src/pkg/syscall/route_netbsd.go @@ -27,7 +27,7 @@ func (any *anyMessage) toRoutingMessage(b []byte) RoutingMessage { } // InterfaceAnnounceMessage represents a routing message containing -// network interface arrival and depature information. +// network interface arrival and departure information. type InterfaceAnnounceMessage struct { Header IfAnnounceMsghdr } diff --git a/src/pkg/syscall/route_openbsd.go b/src/pkg/syscall/route_openbsd.go index 223c15779168b652931f56bd99d4c8be71ff9c26..19f902db74b33cd2a879616b9c331a8e620e5bad 100644 --- a/src/pkg/syscall/route_openbsd.go +++ b/src/pkg/syscall/route_openbsd.go @@ -27,7 +27,7 @@ func (any *anyMessage) toRoutingMessage(b []byte) RoutingMessage { } // InterfaceAnnounceMessage represents a routing message containing -// network interface arrival and depature information. +// network interface arrival and departure information. type InterfaceAnnounceMessage struct { Header IfAnnounceMsghdr } diff --git a/src/pkg/time/zoneinfo_windows.go b/src/pkg/time/zoneinfo_windows.go index 377a892153858016b1a81dec8a7c9f3648516a37..6046743e67d0c9fabe7e1470c96d4a3d58ba4f43 100644 --- a/src/pkg/time/zoneinfo_windows.go +++ b/src/pkg/time/zoneinfo_windows.go @@ -90,7 +90,7 @@ func toEnglishName(stdname, dstname string) (string, error) { return "", errors.New(`English name for time zone "` + stdname + `" not found in registry`) } -// extractCAPS exracts capital letters from description desc. +// extractCAPS extracts capital letters from description desc. func extractCAPS(desc string) string { var short []rune for _, c := range desc {