Versions in this module Expand all Collapse all v0 v0.1.0 May 1, 2023 Changes in this version + func Exported(list interface{}) interface + func Methods(v interface{}) map[string]*Func + func NewTemplate(td *TempalteData) *template.Template + func Position(fset *token.FileSet, v interface{}) token.Position + type ASTNode struct + Name string + Node ast.Node + Object Object + Scope *Scope + Type *Type + Value constant.Value + func NewASTNode(typesInfo *types.Info, n ast.Node) *ASTNode + func (n *ASTNode) BoolVal() bool + func (n *ASTNode) Float32Val() float32 + func (n *ASTNode) Float64Val() float64 + func (n *ASTNode) Int64Val() int64 + func (n *ASTNode) Pos() token.Pos + func (n *ASTNode) String() string + func (n *ASTNode) StringVal() string + func (n *ASTNode) Uint64Val() uint64 + func (n *ASTNode) Val() interface{} + type Array struct + Elem *Type + Len int64 + TypesArray *types.Array + func NewArray(a *types.Array) *Array + func ToArray(t interface{}) *Array + func (a *Array) String() string + type Basic struct + Info types.BasicInfo + Kind types.BasicKind + Name string + TypesBasic *types.Basic + func NewBasic(b *types.Basic) *Basic + func ToBasic(t interface{}) *Basic + func (b *Basic) String() string + type Chan struct + Dir types.ChanDir + Elem *Type + TypesChan *types.Chan + func NewChan(c *types.Chan) *Chan + func ToChan(t interface{}) *Chan + func (c *Chan) String() string + type Const struct + Exported bool + Name string + Package *Package + Type *Type + TypesConst *types.Const + Value constant.Value + func NewConst(c *types.Const) *Const + func (c *Const) BoolVal() bool + func (c *Const) Float32Val() float32 + func (c *Const) Float64Val() float64 + func (c *Const) Int64Val() int64 + func (c *Const) Pos() token.Pos + func (c *Const) String() string + func (c *Const) StringVal() string + func (c *Const) TypesObject() types.Object + func (c *Const) Uint64Val() uint64 + func (c *Const) Val() interface{} + type Field struct + Anonymous bool + Exported bool + Name string + Struct *Struct + Tag string + Type *Type + TypesVar *types.Var + func NewField(s *Struct, v *types.Var, tag string) *Field + func (f *Field) Pos() token.Pos + func (f *Field) String() string + func (f *Field) TypesObject() types.Object + type Func struct + Exported bool + Name string + Package *Package + Signature *Signature + TypesFunc *types.Func + func NewFunc(f *types.Func) *Func + func (f *Func) Pos() token.Pos + func (f *Func) String() string + func (f *Func) TypesObject() types.Object + type Interface struct + Embeddeds []*Type + Empty bool + ExplicitMethodNames []string + ExplicitMethods map[string]*Func + MethodNames []string + Methods map[string]*Func + TypesInterface *types.Interface + func NewInterface(iface *types.Interface) *Interface + func ToInterface(t interface{}) *Interface + func (i *Interface) String() string + type Knife struct + func New(patterns ...string) (*Knife, error) + func (k *Knife) Execute(w io.Writer, pkg *packages.Package, tmpl interface{}, opt *Option) error + func (k *Knife) Packages() []*packages.Package + type Map struct + Elem *Type + Key *Type + TypesMap *types.Map + func NewMap(m *types.Map) *Map + func ToMap(t interface{}) *Map + func (m *Map) String() string + type Named struct + MethodNames []string + Methods map[string]*Func + Object *TypeName + TypesNamed *types.Named + func NewNamed(n *types.Named) *Named + func ToNamed(t interface{}) *Named + func (c *Named) String() string + type Object interface + TypesObject func() types.Object + func NewObject(o types.Object) Object + type Option struct + ExtraData map[string]interface{} + XPath string + type Package struct + ConstNames []string + Consts map[string]*Const + FuncNames []string + Funcs map[string]*Func + Imports []*Package + Name string + Path string + TypeNames []string + Types map[string]*TypeName + TypesPackage *types.Package + VarNames []string + Vars map[string]*Var + func NewPackage(pkg *types.Package) *Package + func (pkg *Package) String() string + type Pointer struct + Elem *Type + TypesPointer *types.Pointer + func NewPointer(p *types.Pointer) *Pointer + func ToPointer(t interface{}) *Pointer + func (p *Pointer) String() string + type Scope struct + Children []*Scope + End token.Pos + Names []string + Objects map[string]Object + Parent *Scope + Pos token.Pos + TypesScope *types.Scope + func NewScope(s *types.Scope) *Scope + func (s *Scope) String() string + type Signature struct + Params []*Var + Recv *Var + Results []*Var + TypesSignature *types.Signature + Variadic bool + func NewSignature(s *types.Signature) *Signature + func ToSignature(t interface{}) *Signature + func (s *Signature) String() string + type Slice struct + Elem *Type + TypesSlice *types.Slice + func NewSlice(s *types.Slice) *Slice + func ToSlice(t interface{}) *Slice + func (s *Slice) String() string + type Struct struct + FieldNames []string + Fields map[string]*Field + TypesStruct *types.Struct + func NewStruct(s *types.Struct) *Struct + func ToStruct(t interface{}) *Struct + func (s Struct) String() string + type TempalteData struct + Extra map[string]interface{} + Files []*ast.File + Fset *token.FileSet + Pkg *types.Package + TypesInfo *types.Info + type Type struct + TypesType types.Type + func NewType(t types.Type) *Type + func (t *Type) Array() *Array + func (t *Type) Basic() *Basic + func (t *Type) Chan() *Chan + func (t *Type) Interface() *Interface + func (t *Type) Map() *Map + func (t *Type) Named() *Named + func (t *Type) Pointer() *Pointer + func (t *Type) Signature() *Signature + func (t *Type) Slice() *Slice + func (t *Type) String() string + func (t *Type) Struct() *Struct + func (t *Type) Underlying() *Type + type TypeName struct + Exported bool + IsAlias bool + Name string + Package *Package + Type *Type + TypesTypeName *types.TypeName + func NewTypeName(tn *types.TypeName) *TypeName + func (tn *TypeName) Pos() token.Pos + func (tn *TypeName) String() string + func (tn *TypeName) TypesObject() types.Object + type Var struct + Exported bool + Name string + Package *Package + Type *Type + TypesVar *types.Var + func NewVar(v *types.Var) *Var + func (v *Var) Pos() token.Pos + func (v *Var) String() string + func (v *Var) TypesObject() types.Object