Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Str2Str ¶
type Str2Str struct {
// contains filtered or unexported fields
}
Str2Str uses StrMap and strstore.StrStore to store map[string]string
func NewStr2Str ¶
func NewStr2Str() *Str2Str
func NewStr2StrFromMap ¶
NewStr2StrFromMap creates StrMapStr2Str from map.
func NewStr2StrFromSlice ¶
NewStr2StrFromSlice creates StrMapStr2Str from key, value slices.
func (*Str2Str) LoadFromMap ¶
LoadFromMap resets Str2Str and loads from map.
func (*Str2Str) LoadFromSlice ¶
LoadFromSlice resets Str2Str and loads from slices.
type StrMap ¶
type StrMap[V any] struct { // contains filtered or unexported fields }
StrMap represents GC friendly readonly string map implementation. type V must NOT contain pointer for performance concern.
func NewFromMap ¶
NewFromMap creates StrMap from map
func NewFromSlice ¶
NewFromSlice creates StrMap from slices, len(kk) must equal to len(vv)
func (*StrMap[V]) Item ¶
Item returns the i'th item in map. It panics if i is not in the range [0, Len()).
func (*StrMap[V]) LoadFromMap ¶
LoadFromMap resets StrMap and loads from map
func (*StrMap[V]) LoadFromSlice ¶
LoadFromSlice resets StrMap and loads from slices, len(kk) must equal to len(vv)