gasti

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncName

func FuncName(n *ast.FuncDecl) string

func IdentValue

func IdentValue(n *ast.Ident) string

func Inspect

func Inspect(f *ast.File, v Visitor)

func Is

func Is[T ast.Node](n ast.Node) (T, bool)

func Parse

func Parse(p string) (*ast.File, error)

func ValueName

func ValueName(n *ast.ValueSpec) []string

func Walk

func Walk(d string, w func(*Inspector)) error

Types

type Inspector

type Inspector struct {
	Path string
	File *ast.File
	Node ast.Node
}

type Visitor

type Visitor func(ast.Node)

func When

func When[T ast.Node](fn func(T)) Visitor

Jump to

Keyboard shortcuts

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