Documentation ¶
Overview ¶
Package extractor enumerating the files and extracting the looks-like-enum lines
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract( pkgs []*packages.Package, fset *token.FileSet, enumName StringMatcher, ) map[Package][]Enum
Extract the enum constants relative records.
func ForEach ¶
func ForEach[R any]( pkgs []*packages.Package, fset *token.FileSet, extract func(ast.Decl, map[ast.Expr]types.TypeAndValue) []R, merge func([]R, []R) []R, ) map[Package][]R
ForEach is going through the packages calling extract function for each declaration found and combining the records extracted per package using the merge function.
Types ¶
type StringMatcher ¶
StringMatcher is a regexp compatible matcher.
Click to show internal directories.
Click to hide internal directories.