asts

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssumeImport

func AssumeImport(dir string) (pkgName string, pkgPath string)

func AssumePkgName

func AssumePkgName(pkgPath string) string

func EqObjectName

func EqObjectName(name string) func(*ast.Object) bool

func FindPkgPath

func FindPkgPath(file *ast.File, pkgName string) string

func GetPkgName

func GetPkgName(decl ast.Expr) (pkgName string)

func GetTypeName

func GetTypeName(decl ast.Expr) (typName string)

func IsExported

func IsExported(obj *ast.Object) bool

func IsStructObject

func IsStructObject(obj *ast.Object) bool

func ObjectByFunc

func ObjectByFunc(pkg *ast.Package, fn func(*ast.Object) bool) (*ast.File, *ast.Object, bool)

func ParsePkgPath

func ParsePkgPath(pkgPath string) (*ast.Package, error)

Types

type VisitorFunc

type VisitorFunc func(ast.Node) ast.Visitor

func (VisitorFunc) Visit

func (fn VisitorFunc) Visit(node ast.Node) ast.Visitor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL