Documentation
¶
Index ¶
- func AnyKeys[V interface{}](data map[interface{}]V) (keys []interface{})
- func CamelizeKeys[V interface{}](data map[string]V) (camelized map[string]V)
- func CopyBaseMap[T BaseTypes](src map[string]T) (dst map[string]T)
- func CopyBaseSlice[V BaseTypes](src []V) (dst []V)
- func DebugWalk(thing map[string]interface{}) (results string)
- func DeepCopy(src map[string]interface{}) (dst map[string]interface{})
- func Delete(m map[string]interface{}, key string)
- func ExtractBoolValue(v interface{}) (b bool)
- func ExtractEnumValue(key string, upper bool, enums []string, data map[string]interface{}) (value string, err error)
- func ExtractIntValue(key string, data map[string]interface{}) (value int, err error)
- func FinalizeNjnFieldAttributes(attrs map[string]interface{}) (attributes []template.HTMLAttr, err error)
- func FinalizeNjnFieldData(data map[string]interface{}, field map[string]interface{}, skip ...string) (err error)
- func Get(m map[string]interface{}, key string) (value interface{})
- func Has(m map[string]interface{}, key string) (present bool)
- func IsMap(v interface{}) (ok bool)
- func KebabKeys[V interface{}](data map[string]V) (kebabed map[string]V)
- func Keys[K ~string, V interface{}](data map[K]V) (keys []K)
- func MakeTypedKey[K comparable, L comparable, V interface{}, M map[L]V](key K, m map[K]M) (made bool)
- func OrderedKeys[K cmp.Ordered, V interface{}](data map[K]V) (keys []K)
- func ParseKeyIntValue(key string, data map[string]interface{}) (v int, ok bool)
- func ParseKeySlice(input string) (key string, idx int, ok bool)
- func ParseNjnFieldAttributes(field map[string]interface{}) (attributes map[string]interface{}, classes []string, styles map[string]string, ...)
- func PrettyMap[T comparable, V interface{}](m map[T]V) (pretty string)
- func ReverseOrderedKeys[K cmp.Ordered, V interface{}](data map[K]V) (keys []K)
- func ReverseSortedKeys[K ~string, V interface{}](data map[K]V) (keys []K)
- func Set(m map[string]interface{}, key string, value interface{}) (err error)
- func SortedKeyLengths[K ~string, V interface{}](data map[K]V) (keys []K)
- func SortedKeys[K ~string, V interface{}](data map[K]V) (keys []K)
- func SortedKeysByLastKeyword[K ~string, V interface{}](data map[K]V) (keys []K)
- func SortedKeysByLastName[K ~string, V interface{}](data map[K]V) (keys []K)
- func TransformAnyToStringSlice(input interface{}) (output []string, ok bool)
- func TransformMapAnyToString(input map[string]interface{}) (output map[string]string)
- func TypedKeys[T comparable, V interface{}](data map[T]V) (keys []T)
- func ValuesSortedByKeys[K ~string, V interface{}](data map[K]V) (values []V)
- type BaseTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelizeKeys ¶
func CopyBaseMap ¶ added in v0.5.0
func CopyBaseSlice ¶ added in v0.5.0
func CopyBaseSlice[V BaseTypes](src []V) (dst []V)
func ExtractBoolValue ¶
func ExtractBoolValue(v interface{}) (b bool)
func ExtractEnumValue ¶
func ExtractIntValue ¶
func FinalizeNjnFieldData ¶
func MakeTypedKey ¶ added in v0.5.0
func MakeTypedKey[K comparable, L comparable, V interface{}, M map[L]V](key K, m map[K]M) (made bool)
func OrderedKeys ¶ added in v0.4.0
func ParseKeyIntValue ¶
func ParseKeySlice ¶ added in v0.5.0
func ParseNjnFieldAttributes ¶
func PrettyMap ¶ added in v0.5.0
func PrettyMap[T comparable, V interface{}](m map[T]V) (pretty string)
func ReverseOrderedKeys ¶ added in v0.4.0
func ReverseSortedKeys ¶
func ReverseSortedKeys[K ~string, V interface{}](data map[K]V) (keys []K)
func SortedKeyLengths ¶
func SortedKeyLengths[K ~string, V interface{}](data map[K]V) (keys []K)
SortedKeyLengths returns the list of keys natural sorted and from longest to shortest
func SortedKeys ¶
func SortedKeys[K ~string, V interface{}](data map[K]V) (keys []K)
func SortedKeysByLastKeyword ¶
func SortedKeysByLastKeyword[K ~string, V interface{}](data map[K]V) (keys []K)
func SortedKeysByLastName ¶
func SortedKeysByLastName[K ~string, V interface{}](data map[K]V) (keys []K)
func TransformMapAnyToString ¶
func TypedKeys ¶ added in v0.2.15
func TypedKeys[T comparable, V interface{}](data map[T]V) (keys []T)
func ValuesSortedByKeys ¶
func ValuesSortedByKeys[K ~string, V interface{}](data map[K]V) (values []V)
Types ¶
Click to show internal directories.
Click to hide internal directories.