func (m *rwMap) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) {
	m.rwmu.Lock()
	actual, loaded = m.data[key]
	if !loaded {
		m.data[key] = value
		actual = value
	}
	m.rwmu.Unlock()
	return actual, loaded
}
LoadOrStore returns the existing value for the key if present.
Otherwise, it stores and returns the given value.
The loaded result is true if the value was loaded, false if stored.
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
}
func (m *rwMap) Store(key, value interface{}) {
	m.rwmu.Lock()
	m.data[key] = value
	m.rwmu.Unlock()
}