mapx

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone[K comparable, V any](m map[K]V) map[K]V

func GetBool added in v0.0.16

func GetBool(m map[string]any, key string, ifFailed bool) bool

func GetFloat64 added in v0.0.16

func GetFloat64(m map[string]any, key string, ifFailed float64) float64

func GetInt added in v0.0.16

func GetInt(m map[string]any, key string, ifFailed int) int

func GetInt64 added in v0.0.16

func GetInt64(m map[string]any, key string, ifFailed int64) int64

func GetString added in v0.0.16

func GetString(m map[string]any, key string, ifFailed string) string

func GetVal

func GetVal[K comparable, V any](m map[string]V, key string, ifNotExists V) V

func Intersection

func Intersection[K comparable, V any](m1 map[K]V, m2 map[K]V) map[K]V

Intersection returns the intersection of two maps, the value of the returned map is the value of the first map

func Union

func Union[K comparable, V any](m1 map[K]V, m2 map[K]V) map[K]V

Union if some value has the same key, the latter one will be used

Types

This section is empty.

Jump to

Keyboard shortcuts

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