Documentation
¶
Index ¶
- Variables
- type SortedMap
- func (sm *SortedMap[K, T]) Delete(keys ...K) *SortedMap[K, T]
- func (sm *SortedMap[K, T]) Get(key K) (T, error)
- func (sm *SortedMap[K, T]) Has(key K) bool
- func (sm *SortedMap[K, T]) HasAll(keys ...K) bool
- func (sm *SortedMap[K, T]) HasAny(keys ...K) bool
- func (sm *SortedMap[K, T]) Items() iter.Seq2[K, T]
- func (sm *SortedMap[K, T]) Keys() []K
- func (sm *SortedMap[K, T]) Len() int
- func (sm *SortedMap[K, T]) MustGet(key K) T
- func (sm *SortedMap[K, T]) Set(key K, value T) *SortedMap[K, T]
- func (sm *SortedMap[K, T]) Values() []T
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyDoesNotExist = errors.New("key does not exist")
Functions ¶
This section is empty.
Types ¶
type SortedMap ¶
type SortedMap[K constraints.Ordered, T any] struct { // contains filtered or unexported fields }
func NewWithCapacity ¶
func NewWithCapacity[K constraints.Ordered, T any](capacity int) *SortedMap[K, T]
Click to show internal directories.
Click to hide internal directories.