mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
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
|
|
}
|