modulepackage
0.0.0-20220912104255-38ec6238285b
Repository: https://github.com/aadog/dict-go.git
Documentation: pkg.go.dev
# README
thread safe dict
Start
go get github.com/aadog/dict-go
test1
d := NewDict()
d.Set("b", "xxx")
d.Set("a", 22.343)
fmt.Println(d.GetAny("a"))
test2
d := NewDictWithMap(map[string]any{
"a": map[string]any{"a": "c"},
})
d.Set("b", "xxx")
d.Set("a", 22.343)
fmt.Println(d.GetAny("a"))
test3
d := NewDictWithMap(map[string]any{
"a": map[string]any{"a": "c"},
})
d.Set("b", "xxx")
d.Set("a", 22.343)
fmt.Println(d.GetAny("a"))
# Functions
No description provided by the author
No description provided by the author
New creates a new empty list and return it's reference.
No description provided by the author
# Structs
No description provided by the author
DictList holds the set of elements in a slice
It also stores the total number of elements currently present in the list, so length of the list is given in O(1)
It uses sync.RWMutex to support concurrent access, all read operations acquires a RLock, and all write operatiors acquires a Lock().
Iterator .