Documentation
¶
Overview ¶
Package datautil provides utilities for working with data types.
Index ¶
- func ConvertAndMapStringArr(ifaceArr []interface{}, f func(string) string) []string
- func ConvertStringArr(ifaceArr []interface{}) []string
- func ConvertVariables(vars []cfclient.Variable) (map[string]string, map[string]string)
- func FlattenStringArr(sArr []string) []interface{}
- func YamlToJson(yamlString string) (string, error)
- func Yq(yamlString string, expression string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertAndMapStringArr ¶
ConvertAndMapStringArr converts an array of interfaces to an array of strings, applying the supplied function to each element.
func ConvertStringArr ¶
func ConvertStringArr(ifaceArr []interface{}) []string
ConvertStringArr converts an array of interfaces to an array of strings.
func ConvertVariables ¶
ConvertVariables converts an array of cfclient. Variables to 2 maps of key/value pairs - first one for un-encrypted variables second one for encrypted variables.
func FlattenStringArr ¶
func FlattenStringArr(sArr []string) []interface{}
FlattenStringArr flattens an array of strings.
func YamlToJson ¶
YamlToJson converts a YAML string to JSON
This function preserves the order of map keys (courtesy of yj package). If this were to use yaml.Unmarshal() and json.Marshal() instead, the order of map keys would be lost.
Types ¶
This section is empty.