Skip to content

Commit 2ffc4dc

Browse files
cuishuanggopherbot
authored andcommitted
all: fix some typos
Change-Id: I4c5169661f9f445a2d4920786a85df70797ca24a Reviewed-on: https://go-review.googlesource.com/c/tools/+/512835 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Run-TryBot: shuang cui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> gopls-CI: kokoro <[email protected]>
1 parent e66c3a5 commit 2ffc4dc

File tree

13 files changed

+17
-17
lines changed

13 files changed

+17
-17
lines changed

cmd/compilebench/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,10 @@ func runBuildCmd(name string, count int, dir, tool string, args []string) error
567567
return nil
568568
}
569569

570-
// genSymAbisFile runs the assembler on the target packge asm files
570+
// genSymAbisFile runs the assembler on the target package asm files
571571
// with "-gensymabis" to produce a symabis file that will feed into
572572
// the Go source compilation. This is fairly hacky in that if the
573-
// asm invocation convenion changes it will need to be updated
573+
// asm invocation convention changes it will need to be updated
574574
// (hopefully that will not be needed too frequently).
575575
func genSymAbisFile(pkg *Pkg, symAbisFile, incdir string) error {
576576
args := []string{"-gensymabis", "-o", symAbisFile,

go/analysis/passes/buildssa/testdata/src/c/c.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ func B() {
1919
m := b.G.Load()
2020
f := b.Load(&b.G)
2121
if f != m {
22-
panic("loads of b.G are expected to be indentical")
22+
panic("loads of b.G are expected to be identical")
2323
}
2424
}

go/analysis/passes/errorsas/testdata/src/a/a.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func _() {
2929
ei interface{}
3030
)
3131
errors.As(nil, &e) // want `second argument to errors.As should not be \*error`
32-
errors.As(nil, &m) // *T where T implemements error
32+
errors.As(nil, &m) // *T where T implements error
3333
errors.As(nil, &f) // *interface
3434
errors.As(nil, perr()) // want `second argument to errors.As should not be \*error`
3535
errors.As(nil, ei) // empty interface

go/analysis/passes/errorsas/testdata/src/typeparams/typeparams.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func _[E error](e E) {
2626
tw twice[myError[int]]
2727
)
2828
errors.As(nil, &e)
29-
errors.As(nil, &m) // *T where T implemements error
29+
errors.As(nil, &m) // *T where T implements error
3030
errors.As(nil, &tw.t) // *T where T implements error
3131
errors.As(nil, perr[error]()) // want `second argument to errors.As should not be \*error`
3232

go/ssa/builder_go120_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestBuildPackageGo120(t *testing.T) {
3636
// as []rune, pointers to rune arrays, rune arrays, or strings.
3737
//
3838
// Comments listed given the current emitted instructions [approximately].
39-
// If multiple conversions are needed, these are seperated by |.
39+
// If multiple conversions are needed, these are separated by |.
4040
// rune was selected as it leads to string casts (byte is similar).
4141
// The length 2 is not significant.
4242
// Multiple array lengths may occur in a cast in practice (including 0).

go/ssa/subst.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (subst *subster) signature(t *types.Signature) types.Type {
388388
// no type params to substitute
389389
// (2)generic method and recv needs to be substituted.
390390

391-
// Recievers can be either:
391+
// Receivers can be either:
392392
// named
393393
// pointer to named
394394
// interface

go/ssa/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func (c *canonizer) Type(T types.Type) types.Type {
304304
return T
305305
}
306306

307-
// A type for representating an canonized list of types.
307+
// A type for representing a canonized list of types.
308308
type typeList []types.Type
309309

310310
func (l *typeList) identical(ts []types.Type) bool {

gopls/internal/lsp/analysis/stubmethods/stubmethods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ type StubInfo struct {
115115
//
116116
// TODO(adonovan): this function (and its following 5 helpers) tries
117117
// to deduce a pair of (concrete, interface) types that are related by
118-
// an assignment, either explictly or through a return statement or
118+
// an assignment, either explicitly or through a return statement or
119119
// function call. This is essentially what the refactor/satisfy does,
120120
// more generally. Refactor to share logic, after auditing 'satisfy'
121121
// for safety on ill-typed code.

gopls/internal/lsp/cache/parse.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func fixMissingCurlies(f *ast.File, b *ast.BlockStmt, parent ast.Node, tok *toke
398398
//
399399
// }
400400
//
401-
// The resulting bool reports whether any fixing occured.
401+
// The resulting bool reports whether any fixing occurred.
402402
func fixEmptySwitch(body *ast.BlockStmt, tok *token.File, src []byte) bool {
403403
// We only care about empty switch statements.
404404
if len(body.List) > 0 || !body.Rbrace.IsValid() {
@@ -475,7 +475,7 @@ func fixDanglingSelector(s *ast.SelectorExpr, tf *token.File, src []byte) []byte
475475
//
476476
// TODO(rfindley): should this constitute an ast 'fix'?
477477
//
478-
// The resulting bool reports whether any fixing occured.
478+
// The resulting bool reports whether any fixing occurred.
479479
func fixPhantomSelector(sel *ast.SelectorExpr, tf *token.File, src []byte) bool {
480480
if !isPhantomUnderscore(sel.Sel, tf, src) {
481481
return false
@@ -525,7 +525,7 @@ func isPhantomUnderscore(id *ast.Ident, tok *token.File, src []byte) bool {
525525
// parser is looking for the conditional expression. However, "i := 0"
526526
// are not valid expressions, so we get a BadExpr.
527527
//
528-
// The resulting bool reports whether any fixing occured.
528+
// The resulting bool reports whether any fixing occurred.
529529
func fixInitStmt(bad *ast.BadExpr, parent ast.Node, tok *token.File, src []byte) bool {
530530
if !bad.Pos().IsValid() || !bad.End().IsValid() {
531531
return false

gopls/internal/lsp/fake/workdir.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func NewWorkdir(dir string, files map[string][]byte) (*Workdir, error) {
120120
// fileID identifies a file version on disk.
121121
type fileID struct {
122122
mtime time.Time
123-
hash string // empty if mtime is old enough to be reliabe; otherwise a file digest
123+
hash string // empty if mtime is old enough to be reliable; otherwise a file digest
124124
}
125125

126126
func hashFile(data []byte) string {
@@ -363,7 +363,7 @@ func (w *Workdir) pollFiles() ([]protocol.FileEvent, error) {
363363
return nil
364364
}
365365

366-
// Opt: avoid reading the file if mtime is sufficently old to be reliable.
366+
// Opt: avoid reading the file if mtime is sufficiently old to be reliable.
367367
//
368368
// If mtime is recent, it may not sufficiently identify the file contents:
369369
// a subsequent write could result in the same mtime. For these cases, we

0 commit comments

Comments
 (0)