toolmapsync

package
v0.0.0-...-6246b8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

并发安全的toolmap

func New

func New[K comparable, V any]() *Map[K, V]

func (*Map[K, V]) Clear

func (m *Map[K, V]) Clear()

func (*Map[K, V]) Empty

func (m *Map[K, V]) Empty() bool

func (*Map[K, V]) FromJSON

func (m *Map[K, V]) FromJSON(data []byte) error

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(key K) (value V, found bool)

func (*Map[K, V]) Keys

func (m *Map[K, V]) Keys() []K

func (*Map[K, V]) MarshalJSON

func (m *Map[K, V]) MarshalJSON() ([]byte, error)

func (*Map[K, V]) Put

func (m *Map[K, V]) Put(key K, value V)

func (*Map[K, V]) Remove

func (m *Map[K, V]) Remove(key K)

func (*Map[K, V]) Size

func (m *Map[K, V]) Size() int

func (*Map[K, V]) String

func (m *Map[K, V]) String() string

func (*Map[K, V]) StringToTypeS2m

func (m *Map[K, V]) StringToTypeS2m(b []byte) error

StringToTypeS2m 这个要实现指针方法不然无法赋值

func (*Map[K, V]) ToJSON

func (m *Map[K, V]) ToJSON() ([]byte, error)

func (*Map[K, V]) TypeToStringS2m

func (m *Map[K, V]) TypeToStringS2m() ([]byte, error)

TypeToStringS2m 指针非指针方法都行

func (*Map[K, V]) UnmarshalJSON

func (m *Map[K, V]) UnmarshalJSON(bytes []byte) error

func (*Map[K, V]) Values

func (m *Map[K, V]) Values() []V

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL