Versions in this module Expand all Collapse all v0 v0.0.2 Nov 3, 2023 Changes in this version + func Apply(node ast.Node, before, after func(Cursor) bool) ast.Node + func ApplyRecursively(n ast.Node) ast.Node + func CopyComments(to, from ast.Node) + func CopyMeta(to, from ast.Node) ast.Node + func CopyPosition(to, from ast.Node) + func ImportPathName(id string) string + func Resolve(f *ast.File, errFn ErrFunc) + func ResolveExpr(e ast.Expr, errFn ErrFunc) + func Sanitize(f *ast.File) error + func ToFile(x ast.Expr) (*ast.File, error) + type Cursor interface + Delete func() + Import func(path string) *ast.Ident + Index func() int + InsertAfter func(n ast.Node) + InsertBefore func(n ast.Node) + Node func() ast.Node + Parent func() Cursor + Replace func(n ast.Node) + type ErrFunc func(pos token.Pos, msg string, args ...interface{}) + type ImportInfo struct + Dir string + ID string + Ident string + PkgName string + func ParseImportSpec(spec *ast.ImportSpec) (info ImportInfo, err error)