Documentation ¶
Index ¶
- func IndexMap[T map[int]string](m T, k int) string
- func IndexSlice[T []string](m T, k int) string
- func ReadZippedData(r io.Reader) ([]byte, error)
- type Map
- func (m *Map[K, V]) CompareAndDelete(key K, old V) (deleted bool)
- func (m *Map[K, V]) CompareAndSwap(key K, old, new V) bool
- func (m *Map[K, V]) Delete(key K)
- func (m *Map[K, V]) Load(key K) (value V, ok bool)
- func (m *Map[K, V]) LoadAndDelete(key K) (value V, loaded bool)
- func (m *Map[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)
- func (m *Map[K, V]) Range(f func(key K, value V) bool)
- func (m *Map[K, V]) Store(key K, value V)
- func (m *Map[K, V]) Swap(key K, value V) (previous V, loaded bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexSlice ¶
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
K,V是变化项
func (*Map[K, V]) CompareAndDelete ¶
func (*Map[K, V]) CompareAndSwap ¶
func (*Map[K, V]) LoadAndDelete ¶
func (*Map[K, V]) LoadOrStore ¶
Click to show internal directories.
Click to hide internal directories.