+
Skip to content

szyhf/go-aster

Repository files navigation

Introduce

To use go/ast easily.

This lib may not completed, but work well in my project, I'll keep improve it with my project.

Install

go get -u -v github.com/szyhf/go-aster

Example

import (
	"fmt"

	aster "github.com/szyhf/go-aster"
)

func main(){
	// an go path directory
	goDir := "./data"

	pkgsTyp, err := aster.ParseDir(goDir, nil)
	if err != nil {
		fmt.Println(err)
		return
	}
	// simple display the result
	fmt.Println(pkgsTyp[0].String())
}

TODO

More details please see the test directory.

About

An ast parse lib for go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载