func (m *rwMap) Store(key, value interface{}) {
	m.rwmu.Lock()
	m.data[key] = value
	m.rwmu.Unlock()
}
Store sets the value for a key.
package goutil
import (
	"math/rand"
	"sync"
	"sync/atomic"
	"time"
	"unsafe"
)
type Map interface {
	Load(key interface{}) (value interface{}, ok bool)
	Store(key, value interface{})
	LoadOrStore(key, value interface{}) (actual interface{}, loaded bool)
	Range(f func(key, value interface{}) bool)
	Random() (key, value interface{}, exist bool)
	Delete(key interface{})
	Clear()
	Len() int
}
func init() {
	rand.Seed(time.Now().UnixNano())
}
func RwMap(capacity ...int) Map {
	var cap int
	if len(capacity) > 0 {
		cap = capacity[0]
	}
	return &rwMap{
		data: make(map[interface{}]interface{}, cap),
	}
}
type rwMap struct {
	data map[interface{}]interface{}
	rwmu sync.RWMutex
}
func (m *rwMap) Load(key interface{}) (value interface{}, ok bool) {
	m.rwmu.RLock()
	value, ok = m.data[key]
	m.rwmu.RUnlock()
	return value, ok
}