From 1e923975f6e0c72fc9edae05ae5553be7e0463ce Mon Sep 17 00:00:00 2001 From: qydysky Date: Wed, 23 Jun 2021 16:25:19 +0800 Subject: [PATCH] fix --- map/map.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/map/map.go b/map/map.go index 64f6b7f..1bee7f9 100644 --- a/map/map.go +++ b/map/map.go @@ -9,16 +9,16 @@ type Map struct{ New func()interface{} } -func (m *Map) Get(key interface{})interface{}{ - if val,ok := m.Load(key);ok{return val} - return m.Set(key, m.New()) +func (t *Map) Get(key interface{})interface{}{ + if val,ok := t.m.Load(key);ok{return val} + return t.m.Set(key, t.m.New()) } -func (m *Map) Del(key interface{}){ - m.Delete(key) +func (t *Map) Del(key interface{}){ + t.m.Delete(key) } -func (m *Map) Set(key interface{},val interface{})interface{}{ - m.Store(key, val) +func (t *Map) Set(key interface{},val interface{})interface{}{ + t.m.Store(key, val) return val } \ No newline at end of file -- 2.39.2