Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupOfTemplate(content string) string
- func HowDeep(data interface{}, element interface{}) int
- func HowDeepIsIt(data interface{}, element interface{}, deep int) int
- func IsArray(data interface{}) bool
- func IsKind(data interface{}, t string) bool
- func IsMap(data interface{}) bool
- func IsMapFirst(data interface{}, element interface{}) bool
- func IsMapLast(data interface{}, element interface{}) bool
- func IsNil(data interface{}) bool
- func IsString(data interface{}) bool
- func IsType(data interface{}, t string) bool
- func UnmarshalJsonArray(data string) ([]interface{}, error)
- func UnmarshalJsonObject(data string) (map[string]interface{}, error)
- type Cell
- type TemplateDir
- type TemplateFile
- type Templating
Constants ¶
View Source
const EXT_CFG = ".cfg"
Variables ¶
View Source
var TemplateFunctions map[string]interface{}
Functions ¶
func CleanupOfTemplate ¶
func HowDeepIsIt ¶
func IsMapFirst ¶
func IsMapFirst(data interface{}, element interface{}) bool
func UnmarshalJsonArray ¶
func UnmarshalJsonObject ¶
Types ¶
type TemplateDir ¶
func NewTemplateDir ¶
func NewTemplateDir(path string, targetRoot string, continueOnError bool) (*TemplateDir, error)
func (*TemplateDir) LoadPartial ¶
func (t *TemplateDir) LoadPartial() error
func (*TemplateDir) Process ¶
func (t *TemplateDir) Process(attributes map[string]interface{}) error
type TemplateFile ¶
type TemplateFile struct { Uid int `yaml:"uid"` Gid int `yaml:"gid"` CheckCmd string `yaml:"checkCmd"` Mode os.FileMode // contains filtered or unexported fields }
func NewTemplateFile ¶
func (*TemplateFile) RunTemplate ¶
func (f *TemplateFile) RunTemplate(dst string, attributes map[string]interface{}, failOnNoValue bool) error
type Templating ¶
type Templating struct {
// contains filtered or unexported fields
}
func NewTemplating ¶
func NewTemplating(partials *txttmpl.Template, filePath, content string) (*Templating, error)
func (*Templating) AddFunction ¶
func (t *Templating) AddFunction(name string, fn interface{})
func (*Templating) AddFunctions ¶
func (t *Templating) AddFunctions(fs map[string]interface{})
Click to show internal directories.
Click to hide internal directories.