mapHelper

package
v1.5.54 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v1.5.6

func Copy(sourceMap map[string]interface{}) map[string]interface{}

Copy 复制一个新的map

func Equal

func Equal(m1, m2 map[string]interface{}) bool

*

  • @func: MapEqual 判断两个map内容相同
  • @author Wiidz
  • @date 2019-11-16

func Exist

func Exist(data map[string]interface{}, key string) bool

*

  • @func: Exist 判断map中是否包含某键值
  • @author Wiidz
  • @date 2019-11-16

func Filter

func Filter(target map[string]interface{}, fields []string)

*

  • @func: FilterMap 过滤map 删除fields以外的键
  • @author Wiidz
  • @date 2019-11-16

func GetFloat64Keys

func GetFloat64Keys(imap map[string]interface{}) []float64

*

  • @func: GetKeys 从 map[string]interface{} 中获取float64类型的键名
  • @author Wiidz
  • @date 2019-11-16

func GetInt64Keys

func GetInt64Keys(imap map[string]interface{}) []int64

*

  • @func: GetKeys 从 map[string]interface{} 中获取int64类型的键名
  • @author Wiidz
  • @date 2019-11-16

func GetIntKeys

func GetIntKeys(imap map[string]interface{}) []int

*

  • @func: GetKeys 从 map[string]interface{} 中获取整数类型的键名
  • @author Wiidz
  • @date 2019-11-16

func GetIntKeysFromIntKeyMap

func GetIntKeysFromIntKeyMap(imap map[int]bool) []int

*

  • @func: GetKeys 从 map[string]interface{} 中获取整数类型的键名
  • @author Wiidz
  • @date 2019-11-16

func GetKeys

func GetKeys(imap map[string]interface{}) []string

func GetKeysPlus

func GetKeysPlus(imap map[string]map[string]interface{}) []string

*

  • @func: GetKeysPlus 从 map[string]map[string]interface{} 中获取一级键名
  • @author Wiidz
  • @date 2019-11-16

func GetValues

func GetValues(imap map[string]interface{}) []interface{}

*

  • @func: GetValues 从 map[string]interface{} 中输出所有的键值到一个[]interface{}数组中
  • @author Wiidz
  • @date 2019-11-16

func HasIllegalKey

func HasIllegalKey(target map[string]interface{}, fields []string) bool

*

  • @func: HasIllegalKey 判断map是否包含规定以外的键
  • @author Wiidz
  • @date 2019-11-06

func Merge added in v1.5.6

func Merge(map1, map2 map[string]interface{}) map[string]interface{}

Merge 合并两个map,生成一个新的

Types

This section is empty.

Jump to

Keyboard shortcuts

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