Versions in this module Expand all Collapse all v0 v0.0.1 Jul 27, 2023 Changes in this version + func BytesToString(b []byte) string + func IsExport(name string) bool + func ParseDir(path string, filter func(fs.FileInfo) bool, mode parser.Mode) (pkgs map[string]*Package, e error) + func StringToBytes(s string) []byte + type Alias struct + Expr ast.Expr + Name string + func NewAlias(name string, expr ast.Expr) *Alias + func (a *Alias) IsExport() bool + func (a *Alias) String() string + type ArrayType struct + Type *ast.ArrayType + func NewArrayType(tp *ast.ArrayType) *ArrayType + func (t *ArrayType) TypeString() string + type BinaryExpr struct + Expr *ast.BinaryExpr + func NewBinaryExpr(expr *ast.BinaryExpr) *BinaryExpr + func (b *BinaryExpr) String() string + type CallExpr struct + Expr *ast.CallExpr + func NewCallExpr(expr *ast.CallExpr) *CallExpr + func (c *CallExpr) String() string + type ChanType struct + Type *ast.ChanType + func NewChanType(tp *ast.ChanType) *ChanType + func (e *ChanType) TypeString() string + type Const struct + Specs []ast.Spec + func NewConst(specs []ast.Spec) *Const + func (c *Const) IsExport() bool + func (c *Const) Output(writer io.Writer, prefix, indent string, all bool) (n int64, e error) + type Field struct + AST *ast.Field + Name string + func NewField(name string, filed *ast.Field) *Field + func (f *Field) IsExport() bool + func (f *Field) Output(indent string) string + func (f *Field) OutputInterface() string + func (f *Field) String() string + type File struct + AST *ast.File + Alias []*Alias + Consts []*Const + Funcs []*Func + Imports []*Import + Interfaces []*Interface + Name string + Structs []*Struct + Vars []*Var + func NewFile(name string, f *ast.File) *File + func ParseFile(path string, src any, mode parser.Mode) (file *File, e error) + func (f *File) Output(writer io.Writer, prefix, indent string, all bool) (n int64, e error) + func (f *File) String() string + type Func struct + Expr *ast.FuncDecl + func NewFunc(expr *ast.FuncDecl) *Func + func (f *Func) IsExport() bool + func (f *Func) String() string + type FuncType struct + Type *ast.FuncType + func NewFuncType(tp *ast.FuncType) *FuncType + func (t *FuncType) ParamsAndResults() string + func (t *FuncType) TypeString() string + type Ident struct + Ident *ast.Ident + func NewIdent(ident *ast.Ident) *Ident + func (t *Ident) TypeString() string + type Import struct + AST *ast.ImportSpec + func NewImport(imt *ast.ImportSpec) *Import + func (imt *Import) Name() string + func (imt *Import) Path() string + func (imt *Import) String() string + type Interface struct + AST *ast.InterfaceType + Name string + func NewInterface(name string, it *ast.InterfaceType) *Interface + func (it *Interface) IsExport() bool + func (it *Interface) IsTemplate() bool + func (it *Interface) Output(writer io.Writer, prefix, indent string) (n int64, e error) + func (it *Interface) String() string + type MapType struct + Type *ast.MapType + func NewMapType(tp *ast.MapType) *MapType + func (t *MapType) TypeString() string + type Package struct + AST *ast.Package + Files []*File + func NewPackage(p *ast.Package) *Package + func (p *Package) Name() string + func (p *Package) Output(writer io.Writer, prefix, indent string, all bool) (n int64, e error) + func (p *Package) String() string + type SelectorExpr struct + Expr *ast.SelectorExpr + func NewSelectorExpr(expr *ast.SelectorExpr) *SelectorExpr + func (e *SelectorExpr) TypeString() string + type StarExpr struct + Expr *ast.StarExpr + func NewStarExpr(expr *ast.StarExpr) *StarExpr + func (e *StarExpr) TypeString() string + type Struct struct + AST *ast.StructType + Fields []*Field + Name string + func NewStruct(name string, st *ast.StructType) *Struct + func (s *Struct) IsExport() bool + func (s *Struct) Output(writer io.Writer, prefix, indent string, all bool) (n int64, e error) + func (s *Struct) String() string + type TypeExpr struct + Expr ast.Expr + func NewTypeExpr(expr ast.Expr) *TypeExpr + func (e *TypeExpr) TypeString() string + type ValueExpr struct + Expr ast.Expr + func NewValueExpr(expr ast.Expr) *ValueExpr + func (v *ValueExpr) String() string + type ValueSpec struct + Spec *ast.ValueSpec + func NewValueSpec(spec *ast.ValueSpec) *ValueSpec + func (v *ValueSpec) IsExport() bool + func (v *ValueSpec) Output(all bool) (s string, e error) + type Var struct + Specs []ast.Spec + func NewVar(specs []ast.Spec) *Var + func (v *Var) IsExport() bool + func (v *Var) Output(writer io.Writer, prefix, indent string, all bool) (n int64, e error)