Documentation
¶
Index ¶
- func Find(rootDir string, ...) (comps []*comp.Component, all []*comp.Component, err error)
- func FindByPatterns(rootDir string, patterns []string, minCount int, creator comp.ComponentCreator) (comps []*comp.Component, all []*comp.Component, err error)
- func FindInside(dir string, creator comp.ComponentCreator, opts ...Option) (*comp.Component, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
func Find( rootDir string, filter func(compName string, root string) (matches bool, err error), creator comp.ComponentCreator, opts ...Option, ) (comps []*comp.Component, all []*comp.Component, err error)
Find finds all components in directory `root` and loads them. Some directories are by default ignored.
func FindByPatterns ¶
func FindByPatterns( rootDir string, patterns []string, minCount int, creator comp.ComponentCreator, ) (comps []*comp.Component, all []*comp.Component, err error)
Find finds components in `rootDir` with names matched by `patterns`.
func FindInside ¶
func FindInside( dir string, creator comp.ComponentCreator, opts ...Option, ) (*comp.Component, error)
Find the matching component inside directory `dir`. Note: Only `WithComponentConfigFilename` makes sense for `opts`.
Types ¶
type Option ¶
type Option func(opts *queryOptions) error
func WithComponentConfigFilename ¶
WithComponentConfigFilename sets the components config filename to be used (default is `comp.ConfigFileName`).
func WithPathFilter ¶
WithPathFilter set a custom path filter.
func WithPathFilterDefault ¶
func WithPathFilterDefault() Option
WithPathFilterDefault sets the default path filter if non it set.
Click to show internal directories.
Click to hide internal directories.