fluent interface for node SetAttribure
This commit is contained in:
@@ -31,8 +31,9 @@ func (n CastArray) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastArray) SetAttribute(key string, value interface{}) {
|
||||
func (n CastArray) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastArray) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastBool) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastBool) SetAttribute(key string, value interface{}) {
|
||||
func (n CastBool) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastBool) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastDouble) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastDouble) SetAttribute(key string, value interface{}) {
|
||||
func (n CastDouble) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastDouble) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastInt) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastInt) SetAttribute(key string, value interface{}) {
|
||||
func (n CastInt) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastInt) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastObject) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastObject) SetAttribute(key string, value interface{}) {
|
||||
func (n CastObject) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastObject) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastString) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastString) SetAttribute(key string, value interface{}) {
|
||||
func (n CastString) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastString) Position() *node.Position {
|
||||
|
||||
@@ -31,8 +31,9 @@ func (n CastUnset) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n CastUnset) SetAttribute(key string, value interface{}) {
|
||||
func (n CastUnset) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n CastUnset) Position() *node.Position {
|
||||
|
||||
Reference in New Issue
Block a user