mirror of https://github.com/golang/go.git
go/analysis: fix typos
Change-Id: I07235ffba66bf0f7ef0e1917c6f711d317c9ae02 Reviewed-on: https://go-review.googlesource.com/c/tools/+/194139 Reviewed-by: Toshihiro Shiino <shiino.toshihiro@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
fef9eaa9e4
commit
5b82db0742
|
|
@ -29,7 +29,7 @@
|
|||
// The notion of "exportedness" that matters here is that of the
|
||||
// compiler. According to the language spec, a method pkg.T.f is
|
||||
// unexported simply because its name starts with lowercase. But the
|
||||
// compiler must nonethless export f so that downstream compilations can
|
||||
// compiler must nonetheless export f so that downstream compilations can
|
||||
// accurately ascertain whether pkg.T implements an interface pkg.I
|
||||
// defined as interface{f()}. Exported thus means "described in export
|
||||
// data".
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ func checkCgo(fset *token.FileSet, f *ast.File, info *types.Info, reportf func(t
|
|||
// cgo files of a package (those that import "C"). Such files are not
|
||||
// Go, so there may be gaps in type information around C.f references.
|
||||
//
|
||||
// This checker was initially written in vet to inpect raw cgo source
|
||||
// This checker was initially written in vet to inspect raw cgo source
|
||||
// files using partial type information. However, Analyzers in the new
|
||||
// analysis API are presented with the type-checked, "cooked" Go ASTs
|
||||
// resulting from cgo-processing files, so we must choose between
|
||||
|
|
@ -133,7 +133,7 @@ func checkCgo(fset *token.FileSet, f *ast.File, info *types.Info, reportf func(t
|
|||
// func (T) f(int) string { ... }
|
||||
//
|
||||
// we synthesize a new ast.File, shown below, that dot-imports the
|
||||
// orginal "cooked" package using a special name ("·this·"), so that all
|
||||
// original "cooked" package using a special name ("·this·"), so that all
|
||||
// references to package members resolve correctly. (References to
|
||||
// unexported names cause an "unexported" error, which we ignore.)
|
||||
//
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// The errorsas package defines an Analyzer that checks that the second arugment to
|
||||
// The errorsas package defines an Analyzer that checks that the second argument to
|
||||
// errors.As is a pointer to a type implementing error.
|
||||
package errorsas
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
// Checks include:
|
||||
// that the name is a valid identifier;
|
||||
// that analyzer names are unique;
|
||||
// that the Requires graph is acylic;
|
||||
// that the Requires graph is acyclic;
|
||||
// that analyzer fact types are unique;
|
||||
// that each fact type is a pointer.
|
||||
func Validate(analyzers []*Analyzer) error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue