Versions in this module Expand all Collapse all v1 v1.0.0 May 1, 2020 Changes in this version + const SemVer + var ErrNotInterface = errors.New("expression not an interface") + var ErrNotSetup = errors.New("not setup") + type Cleanup func() error + type FileOutputStreamProvider struct + BaseDir string + Case string + InPackage bool + KeepTree bool + KeepTreeOriginalDirectory string + TestOnly bool + func (this *FileOutputStreamProvider) GetWriter(iface *Interface) (io.Writer, error, Cleanup) + type Generator struct + func NewGenerator(iface *Interface, pkg string, inPackage bool) *Generator + func (g *Generator) Generate() error + func (g *Generator) GeneratePrologue(pkg string) + func (g *Generator) GeneratePrologueNote(note string) + func (g *Generator) Write(w io.Writer) error + type GeneratorVisitor struct + InPackage bool + Note string + Osp OutputStreamProvider + PackageName string + func (this *GeneratorVisitor) VisitWalk(iface *Interface) error + type Interface struct + File *ast.File + FileName string + Name string + NamedType *types.Named + Pkg *types.Package + QualifiedName string + Type *types.Interface + type NodeVisitor struct + func NewNodeVisitor() *NodeVisitor + func (n *NodeVisitor) DeclaredInterfaces() []string + func (nv *NodeVisitor) Visit(node ast.Node) ast.Visitor + type OutputStreamProvider interface + GetWriter func(iface *Interface) (io.Writer, error, Cleanup) + type Parser struct + func NewParser(buildTags []string) *Parser + func (p *Parser) Find(name string) (*Interface, error) + func (p *Parser) Interfaces() []*Interface + func (p *Parser) Load() error + func (p *Parser) Parse(path string) error + type StdoutStreamProvider struct + func (this *StdoutStreamProvider) GetWriter(iface *Interface) (io.Writer, error, Cleanup) + type Walker struct + BaseDir string + BuildTags []string + Filter *regexp.Regexp + LimitOne bool + Recursive bool + func (this *Walker) Walk(visitor WalkerVisitor) (generated bool) + type WalkerVisitor interface + VisitWalk func(*Interface) error