Documentation ¶
Index ¶
- type Collector
- func (c *Collector) CollectFromFile(f *File, t *ast.File) error
- func (c *Collector) CollectFromFuncDecl(f *File, t *ast.File, decl *ast.FuncDecl) error
- func (c *Collector) CollectFromGenDecl(f *File, decl *ast.GenDecl) error
- func (c *Collector) CollectFromInterfaceType(f *File, s *Object, decl *ast.GenDecl, spec *ast.TypeSpec, ...) error
- func (c *Collector) CollectFromPackage(p *Package, t *ast.Package) error
- func (c *Collector) CollectFromStructType(f *File, s *Object, decl *ast.GenDecl, spec *ast.TypeSpec, typ *ast.StructType) error
- func (c *Collector) CollectFromTypeSpec(f *File, decl *ast.GenDecl, spec *ast.TypeSpec) error
- type Field
- type File
- type Func
- type Object
- type Package
- type PackageBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
func (*Collector) CollectFromFuncDecl ¶
func (*Collector) CollectFromGenDecl ¶
func (*Collector) CollectFromInterfaceType ¶
func (*Collector) CollectFromPackage ¶
func (*Collector) CollectFromStructType ¶
type File ¶
type Func ¶
type Func struct { Name string `json:"name"` Pos token.Pos `json:"-"` Recv string `json:"recv,omitempty"` Params map[string]*Field `json:"params"` ParamNames []string `json:"paramnames"` Returns map[string]*Field `json:"returns"` ReturnNames []string `json:"returnnames"` Doc string `json:"doc"` // associated documentation; or nil (decl or spec?) }
type Object ¶
type Object struct { Name string `json:"name"` Pos token.Pos `json:"-"` Token token.Token `json:"-"` Parent *Object `json:"-"` Fields map[string]*Field `json:"fields,omitempty"` FieldNames []string `json:"fieldnames,omitempty"` Methods map[string]*Func `json:"methods,omitempty"` MethodNames []string `json:"methodnames,omitempty"` Doc string `json:"doc"` // associated documentation; or nil (decl or spec?) Comment string `json:"comment"` // line comments; or nil }
type Package ¶
type Package struct { Files map[string]*File `json:"-"` Interfaces map[string]*Object `json:"interfaces"` Functions map[string]*Func `json:"functions"` Types map[string]*Object `json:"types"` FileNames []string `json:"filenames"` Names []string `json:"names"` }
func NewPackage ¶
func NewPackage() *Package
type PackageBuilder ¶
func (*PackageBuilder) AddFile ¶
func (b *PackageBuilder) AddFile(f *File, filename string)
func (*PackageBuilder) Build ¶
func (b *PackageBuilder) Build() *Package
Click to show internal directories.
Click to hide internal directories.