Archived
Template
1
0

Initial commit

This commit is contained in:
uberswe
2021-12-12 14:56:13 +01:00
commit 0511f8fbca
1627 changed files with 773292 additions and 0 deletions

30
vendor/github.com/modern-go/concurrent/go_below_19.go generated vendored Normal file
View File

@ -0,0 +1,30 @@
//+build !go1.9
package concurrent
import "sync"
type Map struct {
lock sync.RWMutex
data map[interface{}]interface{}
}
func NewMap() *Map {
return &Map{
data: make(map[interface{}]interface{}, 32),
}
}
func (m *Map) Load(key interface{}) (elem interface{}, found bool) {
m.lock.RLock()
elem, found = m.data[key]
m.lock.RUnlock()
return
}
func (m *Map) Store(key interface{}, elem interface{}) {
m.lock.Lock()
m.data[key] = elem
m.lock.Unlock()
}