Documentation ¶
Overview ¶
helps with type coercion and merging maps
Index ¶
- func AreMapStringMapStringInterfacesEqual(a, b map[string]map[string]interface{}) bool
- func AreMapsEqual(a, b map[string]interface{}) bool
- func MergeMaps(high, low map[string]interface{}) map[string]interface{}
- func MergeMapsStringMapStringInterface(high, low map[string]map[string]interface{}) map[string]map[string]interface{}
- func StringSliceCompare(a, b []string) int
- func StringSliceContains(slice []string, value string) bool
- func StringSliceDel(slice []string, value string) []string
- func StringSliceDelAll(slice []string, value string) []string
- func StringSliceDelIndex(a []string, i int) []string
- func StringSliceEquals(a, b []string) bool
- func StringSlicePos(slice []string, value string) int
- func ToBool(v interface{}, k string) (bool, error)
- func ToFloat64(v interface{}, k string) (float64, error)
- func ToInt(v interface{}, k string) (int, error)
- func ToMap(v interface{}, k string) (map[string]interface{}, error)
- func ToMapStringMapStringInterface(v interface{}, k string) (map[string]map[string]interface{}, error)
- func ToString(v interface{}, k string) (string, error)
- func ToStringSlice(v interface{}, k string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreMapsEqual ¶
func MergeMaps ¶
merge possibly-nested maps (first argument takes priority) note that lists are replaced, not merged
func MergeMapsStringMapStringInterface ¶
func MergeMapsStringMapStringInterface(high, low map[string]map[string]interface{}) map[string]map[string]interface{}
merge nested maps (first argument takes priority) note that lists are replaced, not merged
func StringSliceCompare ¶
this was taken from golang `bytes.Compare`.
func StringSliceContains ¶
returns true if a slice contains given string
func StringSliceDel ¶
deletes first occurence of a given string
func StringSliceDelAll ¶
deletes all occurences of a given string
func StringSliceDelIndex ¶
deletes a given index
func StringSliceEquals ¶
func StringSlicePos ¶
returns first index of a given string
func ToMapStringMapStringInterface ¶
func ToMapStringMapStringInterface(v interface{}, k string) (map[string]map[string]interface{}, error)
coerce interface{} to map[string]map[string]interface{}
func ToStringSlice ¶
coerce interface{} to slice of strings.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.