var Analyzer = &analysis.Analyzer{ Name: "printf", Doc: analysisutil.MustExtractDoc(doc, "printf"), URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/printf", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, ResultType: reflect.TypeOf((*Result)(nil)), FactTypes: []analysis.Fact{new(isWrapper)}, }
Kind is a kind of fmt function behavior.
type Kind int
const ( KindNone Kind = iota // not a fmt wrapper function KindPrint // function behaves like fmt.Print KindPrintf // function behaves like fmt.Printf KindErrorf // function behaves like fmt.Errorf )
func (kind Kind) String() string
Result is the printf analyzer's result type. Clients may query the result to learn whether a function behaves like fmt.Print or fmt.Printf.
type Result struct {
// contains filtered or unexported fields
}
func (r *Result) Kind(fn *types.Func) Kind
Kind reports whether fn behaves like fmt.Print or fmt.Printf.