Documentation ¶
Index ¶
- func GenerateOutputFromTemplateFile(templateFileName string, strict bool, config map[string]interface{}, ...) error
- func GenerateOutputFromTemplateString(tmplString string, strict bool, config map[string]interface{}, outFile string) error
- func LoadConfigFiles(parseConf, strict, emptyQuotes bool, configFileNames ...string) (map[string]interface{}, error)
- func ParseConfigHelper(confMap map[string]interface{}, ret map[string]interface{}, strict bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOutputFromTemplateFile ¶
func GenerateOutputFromTemplateFile(templateFileName string, strict bool, config map[string]interface{}, outFile string) error
GenerateOutputFromTemplateFile executes the template file with config as its environment and writes the result to outFile.
func GenerateOutputFromTemplateString ¶
func GenerateOutputFromTemplateString(tmplString string, strict bool, config map[string]interface{}, outFile string) error
GenerateOutputFromTemplateString executes the template string with config as its environment and writes the result to outFile.
func LoadConfigFiles ¶
func LoadConfigFiles(parseConf, strict, emptyQuotes bool, configFileNames ...string) (map[string]interface{}, error)
LoadConfigFiles reads the given JSON5-formatted config files and merges them into a single map[string]interface. If parseConf is true, all config values are converted to strings. If strict is true, will return an error for unsupported types, missing data, etc. If emptyQuotes is true, config values which are empty strings are replaced with empty single quotes (”).
func ParseConfigHelper ¶
func ParseConfigHelper(confMap map[string]interface{}, ret map[string]interface{}, strict bool) error
ParseConfigHelper takes the given config map and adds its values into the given return map in stringified form. If strict is true, it will return an error for unsupported types, missing data, etc.
Types ¶
This section is empty.