go/analysis: fix typos and update documentation
Change-Id: I48187fcb1eedd5b94d7b6b2db1ae11009bab23a2 Reviewed-on: https://go-review.googlesource.com/c/157299 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
68c5ac90f5
commit
40c2d4768f
|
@ -246,7 +246,7 @@ An Analyzer that uses facts must declare their types:
|
||||||
|
|
||||||
var Analyzer = &analysis.Analyzer{
|
var Analyzer = &analysis.Analyzer{
|
||||||
Name: "printf",
|
Name: "printf",
|
||||||
FactTypes: []reflect.Type{reflect.TypeOf(new(isWrapper))},
|
FactTypes: []analysis.Fact{new(isWrapper)},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
//
|
//
|
||||||
// Example of use in another analysis:
|
// Example of use in another analysis:
|
||||||
//
|
//
|
||||||
// import "golang.org/x/tools/go/analysis/passes/inspect"
|
// import (
|
||||||
|
// "golang.org/x/tools/go/analysis"
|
||||||
|
// "golang.org/x/tools/go/analysis/passes/inspect"
|
||||||
|
// "golang.org/x/tools/go/ast/inspector"
|
||||||
|
// )
|
||||||
//
|
//
|
||||||
// var Analyzer = &analysis.Analyzer{
|
// var Analyzer = &analysis.Analyzer{
|
||||||
// ...
|
// ...
|
||||||
|
|
Loading…
Reference in New Issue