attributer interface

This commit is contained in:
z7zmey
2017-12-31 11:57:55 +02:00
parent 6bc2b20c90
commit 8edc05c8d5
153 changed files with 1229 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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