github.com/aavshr/aws-sdk-go@v1.41.3/aws/crr/sync_map.go (about) 1 //go:build go1.9 2 // +build go1.9 3 4 package crr 5 6 import ( 7 "sync" 8 ) 9 10 type syncMap sync.Map 11 12 func newSyncMap() syncMap { 13 return syncMap{} 14 } 15 16 func (m *syncMap) Load(key interface{}) (interface{}, bool) { 17 return (*sync.Map)(m).Load(key) 18 } 19 20 func (m *syncMap) Store(key interface{}, value interface{}) { 21 (*sync.Map)(m).Store(key, value) 22 } 23 24 func (m *syncMap) Delete(key interface{}) { 25 (*sync.Map)(m).Delete(key) 26 } 27 28 func (m *syncMap) Range(f func(interface{}, interface{}) bool) { 29 (*sync.Map)(m).Range(f) 30 }