mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
59752fb36d
* enable revive linter * enable gochecknoinits linter * enable unconvert linter * enable unparam linter * enable asciicheck linter * enable depguard linter * enable nakedret linter * enable megacheck linter * enable nolintlint linter * enable predeclared linter * Update go.yml * Update go.yml
15 lines
376 B
Go
15 lines
376 B
Go
package yqlib
|
|
|
|
func splitDocumentOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
|
log.Debugf("-- splitDocumentOperator")
|
|
|
|
var index uint
|
|
for el := context.MatchingNodes.Front(); el != nil; el = el.Next() {
|
|
candidate := el.Value.(*CandidateNode)
|
|
candidate.Document = index
|
|
index = index + 1
|
|
}
|
|
|
|
return context, nil
|
|
}
|