Documentation ¶
Index ¶
- func CheckCombineArgs(keysNeeded []string, args ...map[string]interface{}) (map[string]interface{}, error)
- func Copy[T constraints.Ordered, P any](targetMap map[T]P) map[T]P
- func Keys[T constraints.Ordered, P any](objMap map[T]P) []T
- func Pop[T constraints.Ordered, P any](targetMap map[T]P, key T) (P, bool)
- func Update[T constraints.Ordered, P any](targetMap map[T]P, srcMaps ...map[T]P)
- func Values[T constraints.Ordered, P any](objMap map[T]P) []P
- type OrderedMap
- func (s *OrderedMap[T]) Append(key string, val T)
- func (s OrderedMap[T]) MarshalJSON() ([]byte, error)
- func (s *OrderedMap[T]) OrderBy(keys ...string)
- func (s *OrderedMap[T]) Pop(key string) (T, bool)
- func (s *OrderedMap[T]) UnmarshalJSON(b []byte) error
- func (s *OrderedMap[T]) UnmarshalYAML(value *yaml.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCombineArgs ¶
func CheckCombineArgs(keysNeeded []string, args ...map[string]interface{}) (map[string]interface{}, error)
combine args and check keys
func Copy ¶
func Copy[T constraints.Ordered, P any](targetMap map[T]P) map[T]P
copy map with single level
func Pop ¶
func Pop[T constraints.Ordered, P any](targetMap map[T]P, key T) (P, bool)
pop key from map
func Update ¶
func Update[T constraints.Ordered, P any](targetMap map[T]P, srcMaps ...map[T]P)
update keys value
func Values ¶
func Values[T constraints.Ordered, P any](objMap map[T]P) []P
Types ¶
type OrderedMap ¶
func NewOrderedMap ¶
func NewOrderedMap[T any]() OrderedMap[T]
func (*OrderedMap[T]) Append ¶
func (s *OrderedMap[T]) Append(key string, val T)
func (OrderedMap[T]) MarshalJSON ¶
func (s OrderedMap[T]) MarshalJSON() ([]byte, error)
func (*OrderedMap[T]) Pop ¶
func (s *OrderedMap[T]) Pop(key string) (T, bool)
func (*OrderedMap[T]) UnmarshalJSON ¶
func (s *OrderedMap[T]) UnmarshalJSON(b []byte) error
func (*OrderedMap[T]) UnmarshalYAML ¶
func (s *OrderedMap[T]) UnmarshalYAML(value *yaml.Node) error
Click to show internal directories.
Click to hide internal directories.