ing
This commit is contained in:
parent
fe763851e8
commit
cd79287e2d
|
@ -12,7 +12,6 @@ type Attributes interface {
|
|||
Get(key string) (value interface{})
|
||||
Remove(key string)
|
||||
Contains(key string) (exist bool)
|
||||
Destroy()
|
||||
}
|
||||
|
||||
func NewAttributes(parent Attributes) Attributes {
|
||||
|
@ -36,9 +35,6 @@ func (am *attributes) initialize() {
|
|||
am.Parent.initialize()
|
||||
}
|
||||
|
||||
if nil == am.values {
|
||||
am.Destroy()
|
||||
}
|
||||
am.values = make(map[string]interface{})
|
||||
}
|
||||
|
||||
|
@ -101,16 +97,6 @@ func (am *attributes) Contains(key string) (exist bool) {
|
|||
return am.Parent.Contains(key)
|
||||
}
|
||||
|
||||
func (am *attributes) Destroy() {
|
||||
if nil != am.values {
|
||||
am.values = nil
|
||||
}
|
||||
|
||||
if nil != am.Parent {
|
||||
am.Parent.Destroy()
|
||||
}
|
||||
}
|
||||
|
||||
func (am *attributes) checkInitialized() {
|
||||
if nil == am.values {
|
||||
panic("Attribute Manager: must be initialized")
|
||||
|
|
Loading…
Reference in New Issue
Block a user