Map

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(data map[string]interface{}, append map[string]interface{})

Append 将一个map合并到另一个map中

func Clone

func Clone[T any](data map[string]T) map[string]T

Clone 浅拷贝一个副本

func ComputeIfAbsent added in v1.0.4

func ComputeIfAbsent(data map[string]interface{}, key string, defaultValue interface{}) interface{}

func GetKeys added in v1.0.3

func GetKeys[T any](data map[string]T) []string

func GetOrDefault

func GetOrDefault(data map[string]interface{}, key string, defaultValue interface{}) interface{}

GetOrDefault 获得元素,如果不存在,以默认值返回

func GetValue

func GetValue(data map[string]interface{}, keys ...interface{}) (interface{}, error)

func SetValue

func SetValue(data map[string]interface{}, keys ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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