maps

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyKeys

func AnyKeys[V interface{}](data map[interface{}]V) (keys []interface{})

func CamelizeKeys

func CamelizeKeys[V interface{}](data map[string]V) (camelized map[string]V)

func DebugWalk

func DebugWalk(thing map[string]interface{}) (results string)

func Delete added in v0.2.2

func Delete(key string, m map[string]interface{})

func ExtractBoolValue

func ExtractBoolValue(v interface{}) (b bool)

func ExtractEnumValue

func ExtractEnumValue(key string, upper bool, enums []string, data map[string]interface{}) (value string, err error)

func ExtractIntValue

func ExtractIntValue(key string, data map[string]interface{}) (value int, err error)

func FinalizeNjnFieldAttributes

func FinalizeNjnFieldAttributes(attrs map[string]interface{}) (attributes []template.HTMLAttr, err error)

func FinalizeNjnFieldData

func FinalizeNjnFieldData(data map[string]interface{}, field map[string]interface{}, skip ...string) (err error)

func Get

func Get(key string, m map[string]interface{}) (value interface{})

func IsMap

func IsMap(v interface{}) (ok bool)

func KebabKeys

func KebabKeys[V interface{}](data map[string]V) (kebabed map[string]V)

func Keys

func Keys[V interface{}](data map[string]V) (keys []string)

func ParseKeyIntValue

func ParseKeyIntValue(key string, data map[string]interface{}) (v int, ok bool)

func ParseNjnFieldAttributes

func ParseNjnFieldAttributes(field map[string]interface{}) (attributes map[string]interface{}, classes []string, styles map[string]string, err error)

func ReverseSortedKeys

func ReverseSortedKeys[V interface{}](data map[string]V) (keys []string)

func SortedKeyLengths

func SortedKeyLengths[V interface{}](data map[string]V) (keys []string)

SortedKeyLengths returns the list of keys natural sorted and from longest to shortest

func SortedKeys

func SortedKeys[V interface{}](data map[string]V) (keys []string)

func SortedKeysByLastKeyword

func SortedKeysByLastKeyword[V interface{}](data map[string]V) (keys []string)

func SortedKeysByLastName

func SortedKeysByLastName[V interface{}](data map[string]V) (keys []string)

func TransformAnyToStringSlice

func TransformAnyToStringSlice(input interface{}) (output []string, ok bool)

func TransformMapAnyToString

func TransformMapAnyToString(input map[string]interface{}) (output map[string]string)

func ValuesSortedByKeys

func ValuesSortedByKeys[V interface{}](data map[string]V) (values []V)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL