astutil

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 开了缓存,ops 可以提高三个数量级
	OptPackageCache = true
)

Functions

func ExprString

func ExprString(expr ast.Expr) (name string)

ExprString 获取一个表达式的文本 经过拼装,可能与源码不完全一致

func ReadPackage added in v0.5.6

func ReadPackage(pkgPath string) (pkg *ast.Package, err error)

use pkgName with last segment in pkgPath

func ReadPackageWithName added in v0.5.6

func ReadPackageWithName(pkgPath string, pkgName string, fileScope string, filter func(os.FileInfo) bool) (pkg *ast.Package, err error)

ReadPackageWithName fileScope used for cache key

Types

This section is empty.

Jump to

Keyboard shortcuts

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