Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Deprecated = &analysis.Analyzer{ Name: "fact.deprecated", Doc: "Mark deprecated objects", Run: deprecated, FactTypes: []analysis.Fact{(*IsDeprecated)(nil)}, ResultType: reflect.TypeOf(DeprecatedResult{}), }
View Source
var Generated = &analysis.Analyzer{ Name: "isgenerated", Doc: "annotate file names that have been code generated", Run: func(pass *analysis.Pass) (interface{}, error) { m := map[string]Generator{} for _, f := range pass.Files { path := pass.Fset.PositionFor(f.Pos(), false).Filename g, ok := isGenerated(path) if ok { m[path] = g } } return m, nil }, RunDespiteErrors: true, ResultType: reflect.TypeOf(map[string]Generator{}), }
Functions ¶
This section is empty.
Types ¶
type DeprecatedResult ¶
type DeprecatedResult struct { Objects map[types.Object]*IsDeprecated Packages map[*types.Package]*IsDeprecated }
type IsDeprecated ¶
type IsDeprecated struct{ Msg string }
func (*IsDeprecated) AFact ¶
func (*IsDeprecated) AFact()
func (*IsDeprecated) String ¶
func (d *IsDeprecated) String() string
Click to show internal directories.
Click to hide internal directories.