Documentation ¶
Index ¶
- func PopEncode(str string) string
- type Bits
- type Body
- type SafeKV
- func (s *SafeKV[K, V]) Clear()
- func (s *SafeKV[K, V]) Delete(key K)
- func (s *SafeKV[K, V]) Get(key K) (V, bool)
- func (s *SafeKV[K, V]) Len() int
- func (s *SafeKV[K, V]) Map(f func(map[K]V))
- func (s *SafeKV[K, V]) Range(f func(key K, value V) bool)
- func (s *SafeKV[K, V]) Set(key K, value V)
- func (s *SafeKV[K, V]) SetNx(key K, value V) bool
- func (s *SafeKV[K, V]) SetX(key K, value V) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bits ¶
type Bits struct {
// contains filtered or unexported fields
}
Bits is a set of bits.
type Body ¶
Body is a map[string]any
func (Body) QueryBytes ¶
QueryBytes returns the query bytes
func (Body) QueryString ¶
QueryString returns the query string
type SafeKV ¶
type SafeKV[K comparable, V any] struct { // contains filtered or unexported fields }
SafeKV is a thread-safe map
func NewSafeKV ¶
func NewSafeKV[K comparable, V any](cap int) *SafeKV[K, V]
NewSafeKV creates a new SafeKV
func (*SafeKV[K, V]) Delete ¶
func (s *SafeKV[K, V]) Delete(key K)
Delete deletes the value associated with the key
func (*SafeKV[K, V]) Get ¶
Get returns the value associated with the key and whether the key existed
func (*SafeKV[K, V]) Set ¶
func (s *SafeKV[K, V]) Set(key K, value V)
Set sets the value associated with the key
Click to show internal directories.
Click to hide internal directories.