Documentation ¶
Index ¶
- type Comment
- type Field
- type File
- type Function
- type Package
- func (p *Package) FileComments() *Comment
- func (p *Package) GetBenchmarkTest(f *Function) *Function
- func (p *Package) GetExampleTest(f *Function) *Function
- func (p *Package) GetUnitTest(f *Function) *Function
- func (p *Package) PackageFunc() []*Function
- func (p *Package) StructFunc(name string) []*Function
- func (p *Package) Structs() []*Struct
- type Struct
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type Function ¶
type Function struct { Name string // 函数名 Internal bool // 内部函数 Generic []*Field // 泛型定义 Params []*Field // 参数字段 Results []*Field // 返回值字段 Comments *Comment // 注释 Struct *Field // 结构体函数对应的结构体字段 IsExample bool // 是否为测试用例 IsTest bool // 是否为单元测试 IsBenchmark bool // 是否为基准测试 Test bool // 是否为测试函数 // contains filtered or unexported fields }
type Package ¶
type Package struct { Dir string Name string Dirs []string Files []*File Functions map[string]*Function }
func NewPackage ¶
func (*Package) FileComments ¶
func (*Package) GetBenchmarkTest ¶
func (*Package) GetExampleTest ¶
func (*Package) GetUnitTest ¶
func (*Package) PackageFunc ¶
func (*Package) StructFunc ¶
Click to show internal directories.
Click to hide internal directories.