astio

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filename

func Filename(pkg *packages.Package, file *ast.File) string

func Inspect

func Inspect(pkg *packages.Package, file *ast.File, v Visitor) error

func Load

func Load(ctx context.Context, pkgNames ...string) ([]*packages.Package, error)

func Position

func Position(pkg *packages.Package, node ast.Node) token.Position

func Write

func Write(pkg *packages.Package, file *ast.File) error

Types

type PackageFunctionCall added in v0.4.1

type PackageFunctionCall struct {
	Position      token.Position
	Call          *ast.CallExpr
	TargetPkg     *ast.Ident
	TargetPkgName *types.PkgName
	TargetFun     *ast.SelectorExpr
	TypesInfo     *types.Info
}

func (*PackageFunctionCall) Args added in v0.4.1

func (call *PackageFunctionCall) Args() []ast.Expr

func (*PackageFunctionCall) FunctionName added in v0.4.1

func (call *PackageFunctionCall) FunctionName() string

func (*PackageFunctionCall) PackagePath added in v0.4.1

func (call *PackageFunctionCall) PackagePath() string

func (*PackageFunctionCall) SetArgs added in v0.4.1

func (call *PackageFunctionCall) SetArgs(args []ast.Expr)

type Visitor

type Visitor interface {
	PackageFunctionCall(call PackageFunctionCall) error
}

Jump to

Keyboard shortcuts

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