Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotTypeSpec = errors.New("not a type spec")
View Source
var ErrTagNotFound = errors.New("tag not found")
Functions ¶
Types ¶
type BookWithTag ¶
type BookWithTypeParam ¶
type FileContext ¶
func (FileContext) FileName ¶
func (ctx FileContext) FileName() string
type Visitor ¶
type Visitor struct { ValueVisitor func(*ast.ValueSpec, Context) error ImportVisitor func(*ast.ImportSpec, Context) error StructVisitor func(*ast.StructType, Context) error IdentVisitor func(*ast.Ident, Context) error CompositeLitVisitor func(*ast.CompositeLit, Context) error // contains filtered or unexported fields }
func (*Visitor) Walk ¶
Walk walks the packages matched with the same rule as packages: https://pkg.go.dev/golang.org/x/tools/go/packages, calling inside visitor function for each top declaration in each file of the packages
# Walk will return immediately once any visitor function have error
func (*Visitor) WithFileFilter ¶
func (v *Visitor) WithFileFilter(f func(FileContext) bool) *Visitor
Click to show internal directories.
Click to hide internal directories.