mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
c6efd5519b
Allows more sophisticated functionality
15 lines
380 B
Go
15 lines
380 B
Go
package yqlib
|
|
|
|
func splitDocumentOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
|
log.Debugf("-- splitDocumentOperator")
|
|
|
|
var index uint = 0
|
|
for el := context.MatchingNodes.Front(); el != nil; el = el.Next() {
|
|
candidate := el.Value.(*CandidateNode)
|
|
candidate.Document = index
|
|
index = index + 1
|
|
}
|
|
|
|
return context, nil
|
|
}
|