Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler func(item *TreeWalkItem) error
type OptionsLoader ¶
type OptionsLoader struct { TemplateFunctions template.FuncMap // contains filtered or unexported fields }
func NewOptionsLoader ¶
func NewOptionsLoader(templateFunctions template.FuncMap) *OptionsLoader
func (*OptionsLoader) AddTemplate ¶
func (l *OptionsLoader) AddTemplate(t *OptionsTemplate)
func (*OptionsLoader) Build ¶
func (l *OptionsLoader) Build(userConfig interface{}) (interface{}, error)
Build executes the options configuration templates, until they converge It bails out after maxIterations
func (*OptionsLoader) HandleOptions ¶
func (l *OptionsLoader) HandleOptions(i *TreeWalkItem) error
HandleOptions is the file handler for options files It builds a template with the file, and adds it to the list of options templates
type OptionsTemplate ¶
type OptionsTemplateList ¶
type OptionsTemplateList []*OptionsTemplate
func (OptionsTemplateList) Len ¶
func (a OptionsTemplateList) Len() int
func (OptionsTemplateList) Less ¶
func (a OptionsTemplateList) Less(i, j int) bool
func (OptionsTemplateList) Swap ¶
func (a OptionsTemplateList) Swap(i, j int)
type TreeWalkItem ¶
type TreeWalkItem struct { Context string Name string Path vfs.Path RelativePath string Meta string Tags []string }
func (*TreeWalkItem) ReadBytes ¶
func (i *TreeWalkItem) ReadBytes() ([]byte, error)
func (*TreeWalkItem) ReadString ¶
func (i *TreeWalkItem) ReadString() (string, error)
Click to show internal directories.
Click to hide internal directories.