Documentation ¶
Overview ¶
As strcase.ToCamel does not work for SCREAMING_SNAKE input, we need our own function here
Index ¶
- Variables
- func Copy(origin map[interface{}]interface{}) map[interface{}]interface{}
- func Drop(origin, toRemove map[interface{}]interface{}) map[interface{}]interface{}
- func ToCamel(val string) string
- func ToLowerCamel(val string) string
- func TransformKeys(origin map[interface{}]interface{}, transform string) map[interface{}]interface{}
- func Union(left, right map[interface{}]interface{}) map[interface{}]interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyTransformFunctions = map[string]func(string) string{ "ToCamel": ToCamel, "ToLowerCamel": ToLowerCamel, "ToKebab": strcase.ToKebab, "ToScreamingKebab": strcase.ToScreamingKebab, "ToSnake": strcase.ToSnake, "ToScreamingSnake": strcase.ToScreamingSnake, }
Functions ¶
func Drop ¶
func Drop(origin, toRemove map[interface{}]interface{}) map[interface{}]interface{}
Drop will remove known entries from a given map recursively.
func ToLowerCamel ¶
func TransformKeys ¶
func TransformKeys(origin map[interface{}]interface{}, transform string) map[interface{}]interface{}
TransformKeys will transform all keys in the given map recursively with the given transform function, which must exist in the 'KeyTransformFunctions' map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.