mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
formatting
This commit is contained in:
parent
5a62b07d72
commit
8974bc7e96
@ -30,4 +30,3 @@ func filterOperator(d *dataTreeNavigator, context Context, expressionNode *Expre
|
|||||||
}
|
}
|
||||||
return context.ChildContext(results), nil
|
return context.ChildContext(results), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,22 +7,22 @@ import (
|
|||||||
var filterOperatorScenarios = []expressionScenario{
|
var filterOperatorScenarios = []expressionScenario{
|
||||||
{
|
{
|
||||||
description: "Filter array",
|
description: "Filter array",
|
||||||
document: `[1,2,3]`,
|
document: `[1,2,3]`,
|
||||||
expression: `filter(. < 3)`,
|
expression: `filter(. < 3)`,
|
||||||
expected: []string{
|
expected: []string{
|
||||||
"D0, P[], (!!seq)::[1, 2]\n",
|
"D0, P[], (!!seq)::[1, 2]\n",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
document: `[1,2,3]`,
|
document: `[1,2,3]`,
|
||||||
expression: `filter(. > 1)`,
|
expression: `filter(. > 1)`,
|
||||||
expected: []string{
|
expected: []string{
|
||||||
"D0, P[], (!!seq)::[2, 3]\n",
|
"D0, P[], (!!seq)::[2, 3]\n",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
description: "Filter array to empty",
|
description: "Filter array to empty",
|
||||||
document: `[1,2,3]`,
|
document: `[1,2,3]`,
|
||||||
expression: `filter(. > 4)`,
|
expression: `filter(. > 4)`,
|
||||||
@ -31,7 +31,7 @@ var filterOperatorScenarios = []expressionScenario{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
description: "Filter empty array",
|
description: "Filter empty array",
|
||||||
document: `[]`,
|
document: `[]`,
|
||||||
expression: `filter(. > 1)`,
|
expression: `filter(. > 1)`,
|
||||||
|
Loading…
Reference in New Issue
Block a user