attributer interface
This commit is contained in:
@@ -26,6 +26,14 @@ func (n CastArray) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastArray) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastArray) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastArray) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastBool) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastBool) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastBool) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastBool) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastDouble) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastDouble) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastDouble) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastDouble) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastInt) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastInt) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastInt) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastInt) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastObject) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastObject) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastObject) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastObject) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastString) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastString) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastString) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastString) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -26,6 +26,14 @@ func (n CastUnset) Attributes() map[string]interface{} {
|
||||
return n.attributes
|
||||
}
|
||||
|
||||
func (n CastUnset) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastUnset) SetAttribute(key string, value interface{}) {
|
||||
n.attributes[key] = value
|
||||
}
|
||||
|
||||
func (n CastUnset) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user