Documentation
¶
Index ¶
- func InterfaceContains(s []interface{}, e string) bool
- func PrettyJson(in string) string
- func PrettyMarshal(data interface{}) (string, error)
- func ReplaceVars(text string, vars interface{}, funcs template.FuncMap) (string, error)
- func StringContains(s []string, e string) bool
- func StructToMap(obj interface{}) (newMap map[string]interface{}, err error)
- func UnmarshalByExt(file string, configData []byte) (map[string]interface{}, error)
- func UnmarshalFile(fileName string, fs filesystem.FileSystemInterface) (map[string]interface{}, error)
- func UnmarshalFileAndReplaceVars(fileName string, vars map[string]interface{}, ...) (map[string]interface{}, error)
- func UnmarshalJson(configData []byte) (map[string]interface{}, error)
- func UnmarshalYaml(configData []byte) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceContains ¶
func PrettyJson ¶
func PrettyMarshal ¶
func ReplaceVars ¶
func StringContains ¶
func StructToMap ¶
Converts a struct to a map while maintaining the json alias as keys
func UnmarshalByExt ¶
func UnmarshalFile ¶
func UnmarshalFile(fileName string, fs filesystem.FileSystemInterface) (map[string]interface{}, error)
func UnmarshalFileAndReplaceVars ¶ added in v2.3.0
func UnmarshalFileAndReplaceVars(fileName string, vars map[string]interface{}, fs filesystem.FileSystemInterface) (map[string]interface{}, error)
func UnmarshalJson ¶
UnmarshalJson parses JSON configuration data into BuilderData.
Parameters:
- configData: A byte slice containing JSON-formatted configuration data.
Returns:
A pointer to BuilderData and an error if unmarshaling fails.
func UnmarshalYaml ¶
UnmarshalYaml parses YAML configuration data into BuilderData.
Parameters:
- configData: A byte slice containing YAML-formatted configuration data.
Returns:
A pointer to BuilderData and an error if unmarshaling fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.