Versions in this module Expand all Collapse all v0 v0.0.1 Jan 3, 2023 Changes in this version + func AddImport(fs *token.FileSet, ast *ast.File, name string, path string) error + func DumpAstFile(fset *token.FileSet, astFile *ast.File, dstFile string) error + func Run(iCtx *InstContext, r *PassRegistry, passNames []string) error + func RunPass(p InstPass, iCtx *InstContext) error + type InstContext struct + AstFile *ast.File + FS *token.FileSet + File string + Metadata map[string]interface{} + OriginalContent []byte + Type *types.Info + func NewInstContext(goSrcFile string) (*InstContext, error) + func (i *InstContext) GetMetadata(key string) (interface{}, bool) + func (i *InstContext) SetMetadata(key string, value interface{}) + type InstPass interface + After func(iCtx *InstContext) + Before func(iCtx *InstContext) + Deps func() []string + GetPostApply func(iCtx *InstContext) func(*astutil.Cursor) bool + GetPreApply func(iCtx *InstContext) func(*astutil.Cursor) bool + type InstPassConstructor func() InstPass + type NoPassError struct + Name string + func (e *NoPassError) Error() string + type PassExistedError struct + Name string + func (e *PassExistedError) Error() string + type PassRegistry struct + func NewPassRegistry() *PassRegistry + func (r *PassRegistry) GetNewPassInstance(name string) (InstPass, error) + func (r *PassRegistry) HasPass(name string) bool + func (r *PassRegistry) ListOfPassNames() []string + func (r *PassRegistry) Register(name string, passc InstPassConstructor) error