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:
Agniva De Sarker 2019-01-10 14:35:22 +05:30 committed by Alan Donovan
parent 68c5ac90f5
commit 40c2d4768f
2 changed files with 6 additions and 2 deletions

View File

@ -246,7 +246,7 @@ An Analyzer that uses facts must declare their types:
var Analyzer = &analysis.Analyzer{
Name: "printf",
FactTypes: []reflect.Type{reflect.TypeOf(new(isWrapper))},
FactTypes: []analysis.Fact{new(isWrapper)},
...
}

View File

@ -8,7 +8,11 @@
//
// 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{
// ...