Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { Names []string // 名称,这里可能有多个,例如:a, b, c int Type *FieldType // 类型 // contains filtered or unexported fields }
func (*Field) ImportPaths ¶
type FieldType ¶
type FieldType struct {
// contains filtered or unexported fields
}
func NewFieldType ¶
func NewFieldType(pkg *Pkg, importManager ImportManager, astType ast.Expr) *FieldType
func (*FieldType) ImportPaths ¶
type Func ¶
type Func struct { Rec *Field Params []*Field Results []*Field // contains filtered or unexported fields }
func (*Func) ImportPaths ¶
type ImportManager ¶
type Option ¶ added in v0.1.2
type Option func(o *PkgBuilder)
type Pkg ¶
type Pkg struct { //Vars []*Field //Const []*Field Imports ImportManager Struct []*Struct Func []*Func // contains filtered or unexported fields }
type PkgBuilder ¶
type PkgBuilder struct {
// contains filtered or unexported fields
}
func NewPkgBuilder ¶
func NewPkgBuilder(options ...Option) *PkgBuilder
func (*PkgBuilder) Build ¶
func (p *PkgBuilder) Build() (*Pkg, error)
func (*PkgBuilder) WithPkgPath
deprecated
func (p *PkgBuilder) WithPkgPath(path string) *PkgBuilder
Deprecated: use WithPath instead
Click to show internal directories.
Click to hide internal directories.