Documentation ¶
Index ¶
- func GetFuncMap() template.FuncMap
- func TmplArray(path string, input interface{}) []interface{}
- func TmplFileExists(filePath string) bool
- func TmplFromYaml(str string) map[string]interface{}
- func TmplGet(path string, input interface{}) interface{}
- func TmplGetFileContent(filePath string) string
- func TmplGetFiles(directoryPath string) []os.FileInfo
- func TmplInt(path string, input interface{}) int
- func TmplIs(a interface{}, b interface{}) bool
- func TmplIsnt(a interface{}, b interface{}) bool
- func TmplStrConst(value string) string
- func TmplString(path string, input interface{}) string
- func TmplToYaml(v interface{}) string
- type KeyValuePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TmplArray ¶
func TmplArray(path string, input interface{}) []interface{}
TmplArray parses a YAML path in the input parameter aas an arraay.
The array can be of any type but order is only deterministic for strings.
func TmplFileExists ¶
func TmplFromYaml ¶
TmplFromYaml converts a YAML document into a map[string]interface{}.
This is not a general-purpose YAML parser, and will not parse all valid YAML documents. Additionally, because its intended use is within templates it tolerates errors. It will insert the returned error message string into m["Error"] in the returned map.
Borrowed from github.com/helm/helm/pkg/chartutil
func TmplGetFileContent ¶
func TmplGetFiles ¶
func TmplStrConst ¶
template function to convert from log.debug to LOG_DEBUG
func TmplToYaml ¶
func TmplToYaml(v interface{}) string
TmplToYaml takes an interface, marshals it to yaml, and returns a string. It will always return a string, even on marshal error (empty string).
This is designed to be called from a template.
Borrowed from github.com/helm/helm/pkg/chartutil
Types ¶
type KeyValuePair ¶
type KeyValuePair struct { Key string Value interface{} }
func TmplObjectArray ¶
func TmplObjectArray(path string, input interface{}) []KeyValuePair
TODO: Add description