mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
handled EvaluateNodes panic (#1140)
This commit is contained in:
parent
3924ed8a35
commit
406bbb8ca4
@ -22,6 +22,7 @@ type allAtOnceEvaluator struct {
|
||||
}
|
||||
|
||||
func NewAllAtOnceEvaluator() Evaluator {
|
||||
InitExpressionParser()
|
||||
return &allAtOnceEvaluator{treeNavigator: NewDataTreeNavigator()}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ var evaluateNodesScenario = []expressionScenario{
|
||||
}
|
||||
|
||||
func TestAllAtOnceEvaluateNodes(t *testing.T) {
|
||||
InitExpressionParser()
|
||||
var evaluator = NewAllAtOnceEvaluator()
|
||||
for _, tt := range evaluateNodesScenario {
|
||||
node := test.ParseData(tt.document)
|
||||
|
@ -7,9 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func getExpressionParser() ExpressionParserInterface {
|
||||
if ExpressionParser == nil {
|
||||
ExpressionParser = newExpressionParser()
|
||||
}
|
||||
InitExpressionParser()
|
||||
return ExpressionParser
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user