ordermap

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderMap

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

OrderMap 有序的map

func NewOrderMap

func NewOrderMap() *OrderMap

NewOrderMap 创建一个有序的map

func (*OrderMap) Clear

func (om *OrderMap) Clear()

Clear 清空map

func (*OrderMap) Delete

func (om *OrderMap) Delete(key string)

Delete 删除key

func (*OrderMap) Each

func (om *OrderMap) Each(fn func(key string, value interface{}))

Each 遍历

func (*OrderMap) Get

func (om *OrderMap) Get(key string) (interface{}, bool)

Get 获取key对应的value

func (*OrderMap) Keys

func (om *OrderMap) Keys() []string

Keys 获取所有的key

func (*OrderMap) Len

func (om *OrderMap) Len() int

Len 返回map中键值对的数量

func (*OrderMap) MustGet

func (om *OrderMap) MustGet(key string) interface{}

MustGet 获取key对应的value,如果不存在则panic

func (*OrderMap) Set

func (om *OrderMap) Set(key string, value interface{})

Set 设置key value

func (*OrderMap) Values

func (om *OrderMap) Values() []interface{}

Values 获取所有的value

Jump to

Keyboard shortcuts

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