Documentation ¶
Index ¶
- func ParseAnnotation(text string, list AnnotationList) error
- func ParseAnnotationList(comments *ast.CommentGroup, list AnnotationList) error
- type Annotation
- type AnnotationList
- type File
- func (f *File) AppendFunc(i *Func)
- func (f *File) AppendInterface(i *Interface)
- func (f *File) AppendStruct(i *Struct)
- func (f *File) FindFunction(annotations ...string) []*Func
- func (f *File) FindInterface(annotations ...string) []*Interface
- func (f *File) FindStruct(annotations ...string) []*Struct
- func (f *File) Size() int
- type Func
- type Interface
- type Parser
- func (p *Parser) Exec() (*Result, error)
- func (p *Parser) FindAnnotation(file string, Package *ast.Package, result *Result) error
- func (p *Parser) ParseFuncDecl(decl *ast.FuncDecl, file *File) error
- func (p *Parser) ParseGenDecl(decl *ast.GenDecl, file *File) error
- func (p *Parser) ParseTypeSpec(spec *ast.TypeSpec, list AnnotationList, file *File)
- type Result
- type Struct
- type TypeA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAnnotation ¶
func ParseAnnotation(text string, list AnnotationList) error
func ParseAnnotationList ¶
func ParseAnnotationList(comments *ast.CommentGroup, list AnnotationList) error
Types ¶
type Annotation ¶
type AnnotationList ¶
type AnnotationList = map[string]*Annotation
type File ¶
type File struct { Name string FileSet *token.FileSet AstFile *ast.File StructList []*Struct InterfaceList []*Interface FuncList []*Func }
func (*File) AppendFunc ¶
func (*File) AppendInterface ¶
func (*File) AppendStruct ¶
func (*File) FindFunction ¶
func (*File) FindInterface ¶
func (*File) FindStruct ¶
type Interface ¶
type Interface struct { Decl *ast.InterfaceType *TypeA }
type Parser ¶
func NewParserFilter ¶
func (*Parser) FindAnnotation ¶
func (*Parser) ParseTypeSpec ¶
func (p *Parser) ParseTypeSpec(spec *ast.TypeSpec, list AnnotationList, file *File)
type Struct ¶
type Struct struct { Decl *ast.StructType *TypeA }
type TypeA ¶
type TypeA struct { Name string Annotations AnnotationList }
func (*TypeA) Get ¶
func (t *TypeA) Get(name string) *Annotation
Click to show internal directories.
Click to hide internal directories.