Skip to content

Commit 440f7d6

Browse files
scopianlancetaylor
authored andcommitted
all: fix a bunch of misspellings
Change-Id: I5b909df0fd048cd66c5a27fca1b06466d3bcaac7 GitHub-Last-Rev: 778c5d2 GitHub-Pull-Request: #35624 Reviewed-on: https://go-review.googlesource.com/c/go/+/207421 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent d856e05 commit 440f7d6

31 files changed

+36
-36
lines changed

misc/trace/trace_viewer_full.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6307,7 +6307,7 @@ <h2>General</h2>
63076307
className=className.toLowerCase();if(opt_parentConstructor&&!opt_parentConstructor.tagName){throw new Error('opt_parentConstructor was not '+'created by tr.ui.b.define');}
63086308
let tagName=className;let tagNS=undefined;if(opt_parentConstructor){if(opt_tagNS){throw new Error('Must not specify tagNS if parentConstructor is given');}
63096309
let parent=opt_parentConstructor;while(parent&&parent.tagName){tagName=parent.tagName;tagNS=parent.tagNS;parent=parent.parentConstructor;}}else{tagNS=opt_tagNS;}
6310-
function f(){if(opt_parentConstructor&&f.prototype.__proto__!==opt_parentConstructor.prototype){throw new Error(className+' prototye\'s __proto__ field is messed up. '+'It MUST be the prototype of '+opt_parentConstructor.tagName);}
6310+
function f(){if(opt_parentConstructor&&f.prototype.__proto__!==opt_parentConstructor.prototype){throw new Error(className+' prototype\'s __proto__ field is messed up. '+'It MUST be the prototype of '+opt_parentConstructor.tagName);}
63116311
let el;if(tagNS===undefined){el=tr.doc.createElement(tagName);}else{el=tr.doc.createElementNS(tagNS,tagName);}
63126312
f.decorate.call(this,el,arguments);return el;}
63136313
f.decorate=function(el){el.__proto__=f.prototype;el.decorate.apply(el,arguments[1]);el.constructor=f;};f.className=className;f.tagName=tagName;f.tagNS=tagNS;f.parentConstructor=(opt_parentConstructor?opt_parentConstructor:undefined);f.toString=function(){if(!f.parentConstructor){return f.tagName;}

src/cmd/compile/internal/gc/bexport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const (
127127
)
128128

129129
// untype returns the "pseudo" untyped type for a Ctype (import/export use only).
130-
// (we can't use an pre-initialized array because we must be sure all types are
130+
// (we can't use a pre-initialized array because we must be sure all types are
131131
// set up)
132132
func untype(ctype Ctype) *types.Type {
133133
switch ctype {

src/cmd/compile/internal/gc/plive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ func (lv *Liveness) markUnsafePoints() {
652652

653653
lv.unsafePoints = bvalloc(int32(lv.f.NumValues()))
654654

655-
// Mark architecture-specific unsafe pointes.
655+
// Mark architecture-specific unsafe points.
656656
for _, b := range lv.f.Blocks {
657657
for _, v := range b.Values {
658658
if v.Op.UnsafePoint() {

src/cmd/compile/internal/gc/range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func typecheckrangeExpr(n *Node) {
101101
v2 = n.List.Second()
102102
}
103103

104-
// this is not only a optimization but also a requirement in the spec.
104+
// this is not only an optimization but also a requirement in the spec.
105105
// "if the second iteration variable is the blank identifier, the range
106106
// clause is equivalent to the same clause with only the first variable
107107
// present."

src/cmd/compile/internal/ssa/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (b *Block) CopyControls(from *Block) {
223223
}
224224

225225
// Reset sets the block to the provided kind and clears all the blocks control
226-
// and auxilliary values. Other properties of the block, such as its successors,
226+
// and auxiliary values. Other properties of the block, such as its successors,
227227
// predecessors and values are left unmodified.
228228
func (b *Block) Reset(kind BlockKind) {
229229
b.Kind = kind

src/cmd/compile/internal/ssa/gen/ARM64.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
(Geq32U x y) -> (GreaterEqualU (CMPW x y))
360360
(Geq64U x y) -> (GreaterEqualU (CMP x y))
361361

362-
// Optimize comparision between a floating-point value and 0.0 with "FCMP $(0.0), Fn"
362+
// Optimize comparison between a floating-point value and 0.0 with "FCMP $(0.0), Fn"
363363
(FCMPS x (FMOVSconst [0])) -> (FCMPS0 x)
364364
(FCMPS (FMOVSconst [0]) x) -> (InvertFlags (FCMPS0 x))
365365
(FCMPD x (FMOVDconst [0])) -> (FCMPD0 x)

src/cmd/compile/internal/ssa/gen/generic.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@
11801180

11811181
// Divisibility checks x%c == 0 convert to multiply and rotate.
11821182
// Note, x%c == 0 is rewritten as x == c*(x/c) during the opt pass
1183-
// where (x/c) is peformed using multiplication with magic constants.
1183+
// where (x/c) is performed using multiplication with magic constants.
11841184
// To rewrite x%c == 0 requires pattern matching the rewritten expression
11851185
// and checking that the division by the same constant wasn't already calculated.
11861186
// This check is made by counting uses of the magic constant multiplication.

src/cmd/compile/internal/ssa/nilcheck_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func TestNilcheckKeepRemove(t *testing.T) {
294294
}
295295
}
296296

297-
// TestNilcheckInFalseBranch tests that nil checks in the false branch of an nilcheck
297+
// TestNilcheckInFalseBranch tests that nil checks in the false branch of a nilcheck
298298
// block are *not* removed.
299299
func TestNilcheckInFalseBranch(t *testing.T) {
300300
c := testConfig(t)

src/cmd/link/internal/ld/dwarf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ func writelines(ctxt *Link, unit *sym.CompilationUnit, ls *sym.Symbol) {
11331133
lastAddr = addr
11341134

11351135
// Output the line table.
1136-
// TODO: Now that we have all the debug information in seperate
1136+
// TODO: Now that we have all the debug information in separate
11371137
// symbols, it would make sense to use a rope, and concatenate them all
11381138
// together rather then the append() below. This would allow us to have
11391139
// the compiler emit the DW_LNE_set_address and a rope data structure

src/cmd/link/internal/loadpe/ldpe.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,16 +459,16 @@ func readpesym(arch *sys.Arch, lookup func(string, int) *sym.Symbol, f *pe.File,
459459
case sys.AMD64:
460460
if name == "__imp___acrt_iob_func" {
461461
// Do not rename __imp___acrt_iob_func into __acrt_iob_func,
462-
// becasue __imp___acrt_iob_func symbol is real
463-
// (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for detials).
462+
// because __imp___acrt_iob_func symbol is real
463+
// (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for details).
464464
} else {
465465
name = strings.TrimPrefix(name, "__imp_") // __imp_Name => Name
466466
}
467467
case sys.I386:
468468
if name == "__imp____acrt_iob_func" {
469469
// Do not rename __imp____acrt_iob_func into ___acrt_iob_func,
470-
// becasue __imp____acrt_iob_func symbol is real
471-
// (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for detials).
470+
// because __imp____acrt_iob_func symbol is real
471+
// (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for details).
472472
} else {
473473
name = strings.TrimPrefix(name, "__imp_") // __imp_Name => Name
474474
}

src/crypto/dsa/dsa_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestSignAndVerifyWithBadPublicKey(t *testing.T) {
108108
}
109109

110110
if Verify(&pub, []byte("testing"), fromHex("2"), fromHex("4")) {
111-
t.Errorf("Verify unexpected success with non-existant mod inverse of Q")
111+
t.Errorf("Verify unexpected success with non-existent mod inverse of Q")
112112
}
113113
}
114114

src/crypto/elliptic/p256.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (p256Curve) ScalarMult(bigX, bigY *big.Int, scalar []byte) (x, y *big.Int)
8585

8686
// Field elements are represented as nine, unsigned 32-bit words.
8787
//
88-
// The value of an field element is:
88+
// The value of a field element is:
8989
// x[0] + (x[1] * 2**29) + (x[2] * 2**57) + ... + (x[8] * 2**228)
9090
//
9191
// That is, each limb is alternately 29 or 28-bits wide in little-endian

src/crypto/tls/handshake_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func (hs *serverHandshakeState) processClientHello() error {
241241
hs.ecdheOk = supportsECDHE(c.config, hs.clientHello.supportedCurves, hs.clientHello.supportedPoints)
242242

243243
if hs.ecdheOk {
244-
// Although omiting the ec_point_formats extension is permitted, some
244+
// Although omitting the ec_point_formats extension is permitted, some
245245
// old OpenSSL version will refuse to handshake if not present.
246246
//
247247
// Per RFC 4492, section 5.1.2, implementations MUST support the

src/crypto/tls/handshake_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func TestTLS12OnlyCipherSuites(t *testing.T) {
274274
}
275275

276276
func TestTLSPointFormats(t *testing.T) {
277-
// Test that a Server returns the ec_point_format extention when ECC is
277+
// Test that a Server returns the ec_point_format extension when ECC is
278278
// negotiated, and not returned on RSA handshake.
279279
tests := []struct {
280280
name string

src/debug/elf/file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,6 @@ func TestIssue10996(t *testing.T) {
818818
"0000")
819819
_, err := NewFile(bytes.NewReader(data))
820820
if err == nil {
821-
t.Fatalf("opening invalid ELF file unexpectedly suceeded")
821+
t.Fatalf("opening invalid ELF file unexpectedly succeeded")
822822
}
823823
}

src/debug/pe/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ func readOptionalHeader(r io.ReadSeeker, sz uint16) (interface{}, error) {
475475
var (
476476
oh32 OptionalHeader32
477477
// There can be 0 or more data directories. So the minimum size of optional
478-
// header is calculated by substracting oh32.DataDirectory size from oh32 size.
478+
// header is calculated by subtracting oh32.DataDirectory size from oh32 size.
479479
oh32MinSz = binary.Size(oh32) - binary.Size(oh32.DataDirectory)
480480
)
481481

@@ -529,7 +529,7 @@ func readOptionalHeader(r io.ReadSeeker, sz uint16) (interface{}, error) {
529529
var (
530530
oh64 OptionalHeader64
531531
// There can be 0 or more data directories. So the minimum size of optional
532-
// header is calculated by substracting oh64.DataDirectory size from oh64 size.
532+
// header is calculated by subtracting oh64.DataDirectory size from oh64 size.
533533
oh64MinSz = binary.Size(oh64) - binary.Size(oh64.DataDirectory)
534534
)
535535

src/internal/bytealg/count_s390x.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TEXT countbytebody<>(SB), NOSPLIT|NOFRAME, $0-0
9595
vxchunks:
9696
// Load 0x01 into every byte element in the 16-byte mask vector.
9797
VREPIB $1, V_MASK // V_MASK = [16]byte{1, 1, ..., 1, 1}
98-
VZERO V_CNT // intial uint128 count of 0
98+
VZERO V_CNT // initial uint128 count of 0
9999

100100
vxloop:
101101
// Load input bytes in 16-byte chunks.

src/math/big/nat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ func (z nat) divRecursiveStep(u, v nat, depth int, tmp *nat, temps []*nat) {
886886
// u = q̂ (v - v_l) + rh << s + u_l
887887
// After the above step, u contains a remainder:
888888
// u = rh << s + u_l
889-
// and we need to substract q̂ v_l
889+
// and we need to subtract q̂ v_l
890890
//
891891
// But it may be a bit too large, in which case q̂ needs to be smaller.
892892
qhatv := tmp.make(3 * n)

src/net/http/serve_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4352,7 +4352,7 @@ func TestCloseWrite(t *testing.T) {
43524352

43534353
// This verifies that a handler can Flush and then Hijack.
43544354
//
4355-
// An similar test crashed once during development, but it was only
4355+
// A similar test crashed once during development, but it was only
43564356
// testing this tangentially and temporarily until another TODO was
43574357
// fixed.
43584358
//

src/net/http/transfer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,11 @@ func chunked(te []string) bool { return len(te) > 0 && te[len(te)-1] == "chunked
633633
// implicitlyChunked is a helper to check for implicity of chunked, because
634634
// RFC 7230 Section 3.3.1 says that the sender MUST apply chunked as the final
635635
// payload body to ensure that the message is framed for both the request
636-
// and the body. Since "identity" is incompatabile with any other transformational
636+
// and the body. Since "identity" is incompatible with any other transformational
637637
// encoding cannot co-exist, the presence of "identity" will cause implicitlyChunked
638638
// to return false.
639639
func implicitlyChunked(te []string) bool {
640-
if len(te) == 0 { // No transfer-encodings passed in, so not implicity chunked.
640+
if len(te) == 0 { // No transfer-encodings passed in, so not implicitly chunked.
641641
return false
642642
}
643643
for _, tei := range te {

src/net/http/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const DefaultMaxIdleConnsPerHost = 2
8989
// Request.GetBody defined. HTTP requests are considered idempotent if
9090
// they have HTTP methods GET, HEAD, OPTIONS, or TRACE; or if their
9191
// Header map contains an "Idempotency-Key" or "X-Idempotency-Key"
92-
// entry. If the idempotency key value is an zero-length slice, the
92+
// entry. If the idempotency key value is a zero-length slice, the
9393
// request is treated as idempotent but the header is not sent on the
9494
// wire.
9595
type Transport struct {

src/net/http/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3717,7 +3717,7 @@ func TestTransportRemovesH2ConnsAfterIdle(t *testing.T) {
37173717
}
37183718
}
37193719

3720-
// This tests that an client requesting a content range won't also
3720+
// This tests that a client requesting a content range won't also
37213721
// implicitly ask for gzip support. If they want that, they need to do it
37223722
// on their own.
37233723
// golang.org/issue/8923

src/net/ipsock_posix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func ipToSockaddr(family int, ip IP, port int, zone string) (syscall.Sockaddr, e
162162
// of IP node.
163163
//
164164
// When the IP node supports IPv4-mapped IPv6 address,
165-
// we allow an listener to listen to the wildcard
165+
// we allow a listener to listen to the wildcard
166166
// address of both IP addressing spaces by specifying
167167
// IPv6 wildcard address.
168168
if len(ip) == 0 || ip.Equal(IPv4zero) {

src/net/lookup_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func validRecs(r *syscall.DNSRecord, dnstype uint16, name string) []*syscall.DNS
375375

376376
// returns the last CNAME in chain
377377
func resolveCNAME(name *uint16, r *syscall.DNSRecord) *uint16 {
378-
// limit cname resolving to 10 in case of a infinite CNAME loop
378+
// limit cname resolving to 10 in case of an infinite CNAME loop
379379
Cname:
380380
for cnameloop := 0; cnameloop < 10; cnameloop++ {
381381
for p := r; p != nil; p = p.Next {

src/runtime/defs_aix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Input to cgo -godefs
99
GOARCH=ppc64 go tool cgo -godefs defs_aix.go > defs_aix_ppc64_tmp.go
1010
11-
This is only an helper to create defs_aix_ppc64.go
11+
This is only a helper to create defs_aix_ppc64.go
1212
Go runtime functions require the "linux" name of fields (ss_sp, si_addr, etc)
1313
However, AIX structures don't provide such names and must be modified.
1414

src/runtime/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (e plainError) Error() string {
8888
return string(e)
8989
}
9090

91-
// An boundsError represents a an indexing or slicing operation gone wrong.
91+
// A boundsError represents an indexing or slicing operation gone wrong.
9292
type boundsError struct {
9393
x int64
9494
y int

src/runtime/mgcscavenge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ func fillAligned(x uint64, m uint) uint64 {
521521
// "[It] works by first zeroing the high bits of the [8]
522522
// bytes in the word. Subsequently, it adds a number that
523523
// will result in an overflow to the high bit of a byte if
524-
// any of the low bits were initialy set. Next the high
524+
// any of the low bits were initially set. Next the high
525525
// bits of the original word are ORed with these values;
526526
// thus, the high bit of a byte is set iff any bit in the
527527
// byte was set. Finally, we determine if any of these high

src/runtime/mheap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ func (h *mheap) freeSpanLocked(s *mspan, acctinuse, acctidle bool) {
14191419
// unscav and adds it into scav before continuing.
14201420
func (h *mheap) scavengeAll() {
14211421
// Disallow malloc or panic while holding the heap lock. We do
1422-
// this here because this is an non-mallocgc entry-point to
1422+
// this here because this is a non-mallocgc entry-point to
14231423
// the mheap API.
14241424
gp := getg()
14251425
gp.m.mallocing++

src/runtime/pprof/pprof_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func containsInlinedCall(f interface{}, maxBytes int) bool {
112112
}
113113

114114
// findInlinedCall returns the PC of an inlined function call within
115-
// the funtion body for the function f if any.
115+
// the function body for the function f if any.
116116
func findInlinedCall(f interface{}, maxBytes int) (pc uint64, found bool) {
117117
fFunc := runtime.FuncForPC(uintptr(funcPC(f)))
118118
if fFunc == nil || fFunc.Entry() == 0 {

src/runtime/slice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type slice struct {
1616
cap int
1717
}
1818

19-
// An notInHeapSlice is a slice backed by go:notinheap memory.
19+
// A notInHeapSlice is a slice backed by go:notinheap memory.
2020
type notInHeapSlice struct {
2121
array *notInHeap
2222
len int

src/runtime/stack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
627627
print(" adjusting ", funcname(f), " frame=[", hex(frame.sp), ",", hex(frame.fp), "] pc=", hex(frame.pc), " continpc=", hex(frame.continpc), "\n")
628628
}
629629
if f.funcID == funcID_systemstack_switch {
630-
// A special routine at the bottom of stack of a goroutine that does an systemstack call.
630+
// A special routine at the bottom of stack of a goroutine that does a systemstack call.
631631
// We will allow it to be copied even though we don't
632632
// have full GC info for it (because it is written in asm).
633633
return true

0 commit comments

Comments
 (0)