smartstrmap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT, MIT Imports: 1 Imported by: 0

README

go-smart-stringkey-map

go - map[string] interface{} 的封装,忽略string key的大小写

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmartStrMap

type SmartStrMap struct {
	// contains filtered or unexported fields
}

SmartStrMap 对 map[string] interface{} 的封装 string格式的key会被忽略大小写

func (SmartStrMap) Get

func (ssm SmartStrMap) Get(key string) (interface{}, bool)

Get 获取 key 对应的 value,第二个返回值(bool)表示元素是否存在

func (SmartStrMap) Range

func (ssm SmartStrMap) Range(f func(key string, value interface{}) bool)

Range 遍历

func (*SmartStrMap) Set

func (ssm *SmartStrMap) Set(key string, value interface{})

Set 设置 key - value 键值对

Jump to

Keyboard shortcuts

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