Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "gounion", Doc: "checks exhaustiveness of type switches on union interfaces", Run: run, Requires: []*analysis.Analyzer{inspect.Analyzer}, FactTypes: []analysis.Fact{new(UnionInterface)}, }
Analyzer is the gounion analyzer that checks exhaustiveness of type switches on union interfaces (interfaces with private marker methods).
Functions ¶
Types ¶
type UnionInterface ¶
type UnionInterface struct {
MarkerMethod string // e.g., "isNode"
Members []string // e.g., ["*BadExpr", "*Ident", "*BasicLit"]
}
UnionInterface is a Fact indicating that an interface is a union type with a private marker method and a set of implementing types.
func (*UnionInterface) AFact ¶
func (*UnionInterface) AFact()
AFact implements the analysis.Fact interface.
Click to show internal directories.
Click to hide internal directories.