Skip to content

Commit 97ea816

Browse files
racequitegopherbot
authored andcommitted
all: fix some typos in comments
Change-Id: I5d5f6cc4a6984b8577e8178082bc60dfe08107b6 GitHub-Last-Rev: 16ede6b GitHub-Pull-Request: #490 Reviewed-on: https://go-review.googlesource.com/c/tools/+/580156 Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
1 parent 8db95b7 commit 97ea816

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

Diff for: go/types/typeutil/map_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestAxioms(t *testing.T) {
4545
func TestMap(t *testing.T) {
4646
var tmap *typeutil.Map
4747

48-
// All methods but Set are safe on on (*T)(nil).
48+
// All methods but Set are safe on (*T)(nil).
4949
tmap.Len()
5050
tmap.At(tPStr1)
5151
tmap.Delete(tPStr1)

Diff for: gopls/internal/cache/metadata/metadata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (mp *Package) String() string { return string(mp.ID) }
154154
// to discard them before requesting type checking, or the products of
155155
// type-checking such as the cross-reference index or method set index.
156156
//
157-
// MetadataForFile doesn't do this filtering itself becaused in some
157+
// MetadataForFile doesn't do this filtering itself because in some
158158
// cases we need to make a reverse dependency query on the metadata
159159
// graph, and it's important to include the rdeps of ITVs in that
160160
// query. But the filtering of ITVs should be applied after that step,

Diff for: gopls/internal/protocol/generate/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func writeprotocol() {
172172
fmt.Fprintln(out, fileHdr)
173173
out.WriteString("import \"encoding/json\"\n\n")
174174

175-
// The followiing are unneeded, but make the new code a superset of the old
175+
// The following are unneeded, but make the new code a superset of the old
176176
hack := func(newer, existing string) {
177177
if _, ok := types[existing]; !ok {
178178
log.Fatalf("types[%q] not found", existing)

Diff for: gopls/internal/test/integration/bench/repo_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ type repo struct {
135135
inDir *string // if set, use this dir as url@commit, and don't delete
136136

137137
dirOnce sync.Once
138-
dir string // directory contaning source code checked out to url@commit
138+
dir string // directory containing source code checked out to url@commit
139139

140140
// shared editor state
141141
editorOnce sync.Once

Diff for: gopls/internal/test/integration/misc/webserver_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func Constructor() Type
183183
})
184184
}
185185

186-
// viewPkgDoc invokes the "View package documention" code action in
186+
// viewPkgDoc invokes the "View package documentation" code action in
187187
// the specified file. It returns the URI of the document, or fails
188188
// the test.
189189
func viewPkgDoc(t *testing.T, env *Env, filename string) protocol.URI {

Diff for: internal/apidiff/testdata/tests.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type u1 int
6262
var V5 u1
6363

6464
// new
65-
var V5 u2 // OK: V5 has changed type, but old u1 corresopnds to new u2
65+
var V5 u2 // OK: V5 has changed type, but old u1 corresponds to new u2
6666

6767
//// Splitting a single type into two is an incompatible change.
6868
// both

Diff for: internal/diff/lcs/old.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (lcs lcs) toDiffs(alen, blen int) []Diff {
8686

8787
// --- FORWARD ---
8888

89-
// fdone decides if the forwward path has reached the upper right
89+
// fdone decides if the forward path has reached the upper right
9090
// corner of the rectangle. If so, it also returns the computed lcs.
9191
func (e *editGraph) fdone(D, k int) (bool, lcs) {
9292
// x, y, k are relative to the rectangle

Diff for: internal/diff/lcs/old_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func TestRandOld(t *testing.T) {
129129
}
130130

131131
// TestDiffAPI tests the public API functions (Diff{Bytes,Strings,Runes})
132-
// to ensure at least miminal parity of the three representations.
132+
// to ensure at least minimal parity of the three representations.
133133
func TestDiffAPI(t *testing.T) {
134134
for _, test := range []struct {
135135
a, b string

Diff for: internal/facts/facts.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ func (s *Set) Encode() []byte {
295295
// we aren't careful about which structs or methods
296296
// we rexport: it should be only those referenced
297297
// from the API of s.pkg.
298-
// TOOD(adonovan): opt: be more precise. e.g.
298+
// TODO(adonovan): opt: be more precise. e.g.
299299
// intersect with the set of objects computed by
300300
// importMap(s.pkg.Imports()).
301-
// TOOD(adonovan): opt: implement "shallow" facts.
301+
// TODO(adonovan): opt: implement "shallow" facts.
302302
if k.pkg != s.pkg {
303303
if k.obj == nil {
304304
continue // imported package fact

Diff for: internal/facts/facts_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ type pkgLookups struct {
272272
// 2. calls (*facts.Decoder).Decode to load the facts exported by its imports,
273273
// 3. exports a myFact Fact for all of package level objects,
274274
// 4. For each lookup for the current package:
275-
// 4.a) lookup the types.Object for an Go source expression in the curent package
275+
// 4.a) lookup the types.Object for a Go source expression in the current package
276276
// (or confirms one is not expected want=="no object"),
277277
// 4.b) finds a Fact for the object (or confirms one is not expected want=="no fact"),
278278
// 4.c) compares the content of the Fact to want.

Diff for: internal/jsonrpc2_v2/jsonrpc2_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func newResults(expect interface{}) interface{} {
240240
func verifyResults(t *testing.T, method string, results interface{}, expect interface{}) {
241241
if expect == nil {
242242
if results != nil {
243-
t.Errorf("%v:Got results %+v where none expeted", method, expect)
243+
t.Errorf("%v:Got results %+v where none expected", method, expect)
244244
}
245245
return
246246
}

Diff for: internal/typeparams/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func IsTypeParam(t types.Type) bool {
7373
// implements the following rule for uninstantiated generic types:
7474
//
7575
// If V and T are generic named types, then V is considered assignable to T if,
76-
// for every possible instantation of V[A_1, ..., A_N], the instantiation
76+
// for every possible instantiation of V[A_1, ..., A_N], the instantiation
7777
// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N].
7878
//
7979
// If T has structural constraints, they must be satisfied by V.

Diff for: internal/typesinternal/errorcode.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1449,10 +1449,10 @@ const (
14491449
NotAGenericType
14501450

14511451
// WrongTypeArgCount occurs when a type or function is instantiated with an
1452-
// incorrent number of type arguments, including when a generic type or
1452+
// incorrect number of type arguments, including when a generic type or
14531453
// function is used without instantiation.
14541454
//
1455-
// Errors inolving failed type inference are assigned other error codes.
1455+
// Errors involving failed type inference are assigned other error codes.
14561456
//
14571457
// Example:
14581458
// type T[p any] int

0 commit comments

Comments
 (0)