Documentation ¶
Index ¶
- Variables
- func Eq[T Comparable](a, b T) bool
- func Get[T Comparable](a, b T) bool
- func Gt[T Comparable](a, b T) bool
- func Let[T Comparable](a, b T) bool
- func Lt[T Comparable](a, b T) bool
- func Neq[T Comparable](a, b T) bool
- type Comparable
- type Map
- func (m *Map[K, V]) Clear()
- func (m *Map[K, V]) Len() int
- func (m *Map[K, V]) Load(k K) (v V, ok bool)
- func (m *Map[K, V]) LoadAndRemove(k K) (v V, ok bool)
- func (m *Map[K, V]) LoadOrStore(k K, newv func() (V, error)) (V, error)
- func (m *Map[K, V]) Range(f func(k K, v V) bool)
- func (m *Map[K, V]) Remove(k K)
- func (m *Map[K, V]) Store(k K, v V)
- func (m *Map[K, V]) StoreNX(k K, v V) bool
- type Set
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConflict = errors.Errorf("slice elements exsit conflict(s)")
Functions ¶
func Eq ¶
func Eq[T Comparable](a, b T) bool
func Get ¶
func Get[T Comparable](a, b T) bool
func Gt ¶
func Gt[T Comparable](a, b T) bool
func Let ¶
func Let[T Comparable](a, b T) bool
func Lt ¶
func Lt[T Comparable](a, b T) bool
func Neq ¶
func Neq[T Comparable](a, b T) bool
Types ¶
type Comparable ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func New ¶
func New[K comparable, V any]() *Map[K, V]
func (*Map[K, V]) LoadAndRemove ¶
func (*Map[K, V]) LoadOrStore ¶
type Set ¶
type Set[K comparable] map[K]bool
func ToSet ¶
func ToSet[K comparable](vals []K, conv func(K) K) (s Set[K], err error)
Click to show internal directories.
Click to hide internal directories.