map_utils

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShallowCloneOrderedMap

func ShallowCloneOrderedMap(m *orderedmap.OrderedMap) *orderedmap.OrderedMap

func ShallowUnmarshalMap

func ShallowUnmarshalMap(m map[string]interface{}, v any) error

func ShallowUnmarshalOrderedMap

func ShallowUnmarshalOrderedMap(m *orderedmap.OrderedMap, v any) error

func ToKeySortedMap

func ToKeySortedMap[T any](src map[string]T) *orderedmap.OrderedMap

func ToOrderedMap

func ToOrderedMap[T any](src map[string]T, sortFunc func([]string)) *orderedmap.OrderedMap

func UnorderMap

func UnorderMap(m *orderedmap.OrderedMap) map[string]interface{}

func UnorderMapTypedValues

func UnorderMapTypedValues[T any](m *orderedmap.OrderedMap) map[string]T

func UnsafeGet

func UnsafeGet[T any](m *orderedmap.OrderedMap, key string) T

UnsafeGet returns the value associated with the key without checking if the key exists. This is useful for loop iterations: The loop runs over the keys using Keys(), so it is safe to use Get(), Yet the original interface (with comma-ok) does not allow for inline-conversion, which forces the creation of an intermediate temporary variable.

func UnsafeGetUntyped

func UnsafeGetUntyped(m *orderedmap.OrderedMap, key string) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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