mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Pass context through operators
Allows more sophisticated functionality
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package yqlib
|
||||
|
||||
import "container/list"
|
||||
|
||||
func valueOperator(d *dataTreeNavigator, matchMap *list.List, expressionNode *ExpressionNode) (*list.List, error) {
|
||||
func valueOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||||
log.Debug("value = %v", expressionNode.Operation.CandidateNode.Node.Value)
|
||||
return nodeToMap(expressionNode.Operation.CandidateNode), nil
|
||||
return context.SingleChildContext(expressionNode.Operation.CandidateNode), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user