safe

package
v1.2.1-6.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Lock sync.RWMutex
	Map  map[interface{}]interface{}
}

一级 Map

func (*Map) Clear

func (p *Map) Clear()

清空 map

func (*Map) Del

func (p *Map) Del(name interface{})

删除 map

func (*Map) Get

func (p *Map) Get(name interface{}) (interface{}, bool)

获取 map

func (*Map) GetAll

func (p *Map) GetAll() map[interface{}]interface{}

获取全部 map

func (*Map) Set

func (p *Map) Set(name interface{}, value interface{})

设置 map

func (*Map) Size

func (p *Map) Size() int

数据条数

type Map2

type Map2 struct {
	Lock sync.RWMutex
	Map  map[interface{}]map[interface{}]interface{}
}

二级 Map

func (*Map2) Clear

func (p *Map2) Clear()

清空 map

func (*Map2) Del

func (p *Map2) Del(key1 interface{})

删除一级 map

func (*Map2) DelList

func (p *Map2) DelList(key1 interface{}, key2 interface{})

删除二级 map

func (*Map2) Get

func (p *Map2) Get(key1 interface{}, key2 interface{}) (interface{}, bool)

获取 map

func (*Map2) GetAll

func (p *Map2) GetAll() map[interface{}]map[interface{}]interface{}

获取全部 map

func (*Map2) GetList

func (p *Map2) GetList(key1 interface{}) (map[interface{}]interface{}, bool)

获取二级 key 列表

func (*Map2) GetListSize

func (p *Map2) GetListSize(key1 interface{}) int

获取二级 key 列数据条数

func (*Map2) Set

func (p *Map2) Set(key1 interface{}, key2 interface{}, value interface{})

设置 map

func (*Map2) Size

func (p *Map2) Size() int

数据条数

Jump to

Keyboard shortcuts

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