From ea2b6398a7f4c984c1c39499d7953d18806b7dc5 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 27 Nov 2017 14:57:26 +0900 Subject: [PATCH] ing --- context/attributes.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/context/attributes.go b/context/attributes.go index d440050..696fc83 100644 --- a/context/attributes.go +++ b/context/attributes.go @@ -16,8 +16,9 @@ type AttributeManagers struct { func (am *AttributeManagers) Init() { if nil == am.attributes { - am.attributes = make(map[string]interface{}) + am.Destroy() } + am.attributes = make(map[string]interface{}) } func (am *AttributeManagers) SetAttribute(key string, value interface{}) { @@ -62,7 +63,7 @@ func (am *AttributeManagers) Contains(key string) (exist bool) { } func (am *AttributeManagers) Destroy() { - if nil == am.attributes { + if nil != am.attributes { am.attributes = nil } }