Documentation ¶
Index ¶
- func DefaultFlags(s *Settings) (flags *pflag.FlagSet)
- func LoadPackages(packages []string) (pkgs []*decorator.Package, err error)
- func Process(settings Settings, packages []string, ...) (err error)
- func ProcessPackages(settings Settings, pkgs []*decorator.Package, ...) (err error)
- type Settings
- type SimpleResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFlags ¶
func Process ¶
func Process(settings Settings, packages []string, update func(fn *dst.FuncDecl, shouldSkip bool) (imports []string), getResolver func(pkg *decorator.Package, file *dst.File) resolver.RestorerResolver) (err error)
Process applies the specified update function to relevant functions discovered within packages matching the passed-in package patterns. The supplied resolver must be capable of matching any pre-existing import within the loaded packages as well as any introduced by the update function.
Types ¶
type Settings ¶
type Settings struct { Exclude []string Tagged bool Exported bool Methods bool // contains filtered or unexported fields }
func DefaultSettings ¶
func DefaultSettings() (s Settings)
type SimpleResolver ¶
func NewSimpleResolver ¶
func (SimpleResolver) ResolvePackage ¶
func (r SimpleResolver) ResolvePackage(importPath string) (string, error)
Click to show internal directories.
Click to hide internal directories.