basemap

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-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 GeneralMap

type GeneralMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

GeneralMap 是一个泛型 map 结构体

func NewGeneralMap

func NewGeneralMap[K comparable, V any]() *GeneralMap[K, V]

NewMyMap 创建并返回一个新的 GeneralMap 实例

func (*GeneralMap[K, V]) Each

func (m *GeneralMap[K, V]) Each(f func(key K, value V) bool)

Range 遍历 GeneralMap 中的所有键值对

func (*GeneralMap[K, V]) Get

func (m *GeneralMap[K, V]) Get(key K) (V, bool)

Get 根据键获取值

func (*GeneralMap[K, V]) Set

func (m *GeneralMap[K, V]) Set(key K, value V)

Set 设置键值对

Jump to

Keyboard shortcuts

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