This commit is contained in:
crusader 2017-11-27 14:57:26 +09:00
parent b221ead4e4
commit ea2b6398a7

View File

@ -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
}
}