fluent interface for node SetAttribure

This commit is contained in:
vadim
2018-01-02 14:11:08 +02:00
parent 2051e3a23d
commit 31cc11da0c
153 changed files with 392 additions and 240 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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