You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
starmap/starmap.go

26 lines
366 B
Go

4 years ago
package starmap
import "sync"
var globalMap StarMapKV
type StarMapKV struct {
kvMap map[interface{}]interface{}
mu sync.RWMutex
}
4 years ago
type StarStackMem struct {
4 years ago
kvPushmu sync.RWMutex
kvStack []interface{}
}
4 years ago
func init() {
globalMap = NewStarMap()
}
func NewStarMap() StarMapKV {
var mp StarMapKV
mp.kvMap = make(map[interface{}]interface{})
return mp
4 years ago
}