Documentation ¶
Index ¶
- func ArrayContains(arr []interface{}, value interface{}) bool
- func ExtractObject(object interface{}, path ...string) (interface{}, error)
- func MapKeysToString(v interface{}) interface{}
- func MapNVLKeys(mp map[string]interface{}, defaultValue interface{}, keys ...string) interface{}
- func MapNestedKeysToString(m map[string]interface{}) map[string]interface{}
- func MapPutAll(destination map[string]interface{}, source map[string]interface{})
- func Nvl(args ...interface{}) interface{}
- func NvlFloat(args ...float64) float64
- func NvlInt(args ...int) int
- func NvlMap(args ...map[string]interface{}) map[string]interface{}
- func NvlString(args ...string) string
- func ShortenString(str string, n int) string
- func ShortenStringWithEllipsis(str string, n int) string
- func StringMapPutAll(destination map[string]string, source map[string]string)
- type RichError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func ArrayContains(arr []interface{}, value interface{}) bool
func ExtractObject ¶
func MapKeysToString ¶
func MapKeysToString(v interface{}) interface{}
MapKeysToString recursively traverses passed object if it is map or slice and converts all map[interface{}]interface{} objects to map[string]interface{} that may be necessary for json marshalling of objects extracted from yaml
func MapNVLKeys ¶
MapNVLKeys returns value by first key that exists or empty value of V type if no keys exist
func MapNestedKeysToString ¶
MapNestedKeysToString recursively traverses passed map and converts all nested map[interface{}]interface{} objects to map[string]interface{} that may be necessary for json marshalling of objects extracted from yaml
func Nvl ¶
func Nvl(args ...interface{}) interface{}
Nvl returns first not null object or pointer from varargs
return nil if all passed arguments are nil
func NvlMap ¶
NvlMap returns first not empty map from varargs
return nil if all passed maps are empty
func NvlString ¶
NvlString returns first not empty string value from varargs
return "" if all strings are empty
func ShortenString ¶
ShortenString returns the first N slice of a string.
func ShortenStringWithEllipsis ¶
ShortenStringWithEllipsis returns the first N slice of a string and ends with ellipsis.