Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface {
Cache() map[string]interface{}
}
Cache should return the complete cached contents for all of the variables. .Cache() is used by the built in "include" function for the templates.
type IncludeManager ¶
IncludeManager handles including and managing files. The idea is to be able to load your variables for dotfiles from within the template. This gives a few advantages over passing them into the program as flags. Such as; The ability to track requirements, as in, I know what dot files require which variables. This lets you reload specific dot files and systems when only those variables have changed.
type Included ¶
Included should return a map of name / path keys with a slice of paths for the values. This is supposed to be a map of dot files, containing a slice of each variable file it requires.
type Includer ¶
Includer is used to dynamically load arbitrary data from inside templates. This takes 2 strings, one is 'origin' this is supposed to be the file you import from. This function is not directly exposed to the templates as "include", The templates "include" is a small wrapper that appends 'origin' automagically so that is not required in the templates.
type VarIncluder ¶
type VarIncluder struct { Paths map[string][]string Parsers map[string]Parser Cached map[string]interface{} // contains filtered or unexported fields }
func NewVarIncluder ¶
func NewVarIncluder(parsers map[string]Parser) *VarIncluder
func (VarIncluder) Cache ¶
func (v VarIncluder) Cache() map[string]interface{}
func (*VarIncluder) Clear ¶
func (v *VarIncluder) Clear() bool
func (VarIncluder) Include ¶
func (v VarIncluder) Include(fpath string, origin string) interface{}
func (VarIncluder) Included ¶
func (v VarIncluder) Included() map[string][]string
func (VarIncluder) SavePath ¶
func (v VarIncluder) SavePath(fpath string, origin string)