Documentation ¶
Index ¶
- func ContainType(name string, types []*ast.TypeSpec) bool
- func ExtractStruct(node ast.Node, sub *[]*ast.TypeSpec)
- func FindMatchStruct(files []*ast.File, match FuncMatchStruct) []*ast.TypeSpec
- func GetStructByName(f *ast.File, structName string) (*ast.TypeSpec, error)
- type FuncMatchStruct
- type Program
- func (p *Program) ExtractStruct(node ast.Node, sub *[]*ast.TypeSpec)
- func (p *Program) GetFuncByName(pkgName, funcName string) (*ast.FuncDecl, error)
- func (p *Program) GetPkgByName(name string) (*loader.PackageInfo, error)
- func (p *Program) GetStructByName(pkgName, structName string) (typeSpec *ast.TypeSpec, err error)
- func (p *Program) GetStructByNameFromPkgs(pkgs []string, structName string) (*ast.TypeSpec, error)
- func (p *Program) GetValueByName(pkgName, valueName string) (*ast.ValueSpec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStruct ¶
ExtractStruct extract struct spec to all type spec it depends (including itself)
func FindMatchStruct ¶
func FindMatchStruct(files []*ast.File, match FuncMatchStruct) []*ast.TypeSpec
Types ¶
type FuncMatchStruct ¶
type Program ¶
func NewProgram ¶
func (*Program) ExtractStruct ¶
ExtractStruct extract struct spec to all type spec it depends (including itself)
func (*Program) GetFuncByName ¶
func (*Program) GetPkgByName ¶
func (p *Program) GetPkgByName(name string) (*loader.PackageInfo, error)
func (*Program) GetStructByName ¶
func (*Program) GetStructByNameFromPkgs ¶
Click to show internal directories.
Click to hide internal directories.