ast

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0, MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DotImportPaths

func DotImportPaths(f *std_ast.File) (paths []string)

func FileSetNodeToString

func FileSetNodeToString(fset *token.FileSet, n std_ast.Node) string

func FileSetNodeToStringShort added in v0.1.1

func FileSetNodeToStringShort(fset *token.FileSet, n std_ast.Node) string

func GlobalImportPaths

func GlobalImportPaths(f *std_ast.File) (paths []string)

GlobalImportPaths returns all import paths of packages whose globals were imported into the file via dot- or non-blank-named import. It returns the path count.

func ImportNameToPath

func ImportNameToPath(f *std_ast.File, target string) string

ImportNameToPath returns the path by a non-dot, non-blank import name.

func IsGlobalDeclName

func IsGlobalDeclName(f *std_ast.File, name string) bool

IsGlobalDeclName returns true if a const/function/type/var's name matches the input.

func PositionStringShort added in v0.1.1

func PositionStringShort(p token.Position) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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