mapx

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys added in v0.1.69

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

Keys 返回 map 里面的所有的 key。 需要注意:这些 key 的顺序是随机。

func KeysValues added in v0.1.69

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

KeysValues 返回 map 里面的所有的 key,value。 需要注意:这些 (key,value) 的顺序是随机,相对顺序是一致的。

func MapToJsonString

func MapToJsonString(m map[string]interface{}) string

func MapToStringSlice

func MapToStringSlice(m map[string]any) []any

func StructToMap

func StructToMap(s any) map[string]any

func Values added in v0.1.69

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

Values 返回 map 里面的所有的 value。 需要注意:这些 value 的顺序是随机。

Types

This section is empty.

Jump to

Keyboard shortcuts

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