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

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