mirror of
https://gitee.com/mirrors_adrian-thurston/yq.git
synced 2026-01-15 07:53:35 +08:00
Compare commits
2 Commits
v4.25.3-st
...
v4.25.4-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76d7164117 | ||
|
|
cba925142f |
@@ -94,7 +94,7 @@ yq -P sample.json
|
||||
|
||||
rootCmd.PersistentFlags().StringVarP(&expressionFile, "from-file", "", "", "Load expression from specified file.")
|
||||
|
||||
rootCmd.PersistentFlags().BoolVarP(&stripComments, "strip-comments", "", false, "Strip comments from output.")
|
||||
rootCmd.PersistentFlags().BoolVarP(&stripComments, "strip-comments", "t", false, "Strip comments from output.")
|
||||
|
||||
rootCmd.AddCommand(
|
||||
createEvaluateSequenceCommand(),
|
||||
|
||||
@@ -31,7 +31,7 @@ var evaluateNodesScenario = []expressionScenario{
|
||||
}
|
||||
|
||||
func TestAllAtOnceEvaluateNodes(t *testing.T) {
|
||||
var evaluator = NewAllAtOnceEvaluator()
|
||||
var evaluator = NewAllAtOnceEvaluator(false)
|
||||
for _, tt := range evaluateNodesScenario {
|
||||
node := test.ParseData(tt.document)
|
||||
list, _ := evaluator.EvaluateNodes(tt.expression, &node)
|
||||
|
||||
@@ -171,7 +171,7 @@ func formatYaml(yaml string, filename string) string {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
streamEvaluator := NewStreamEvaluator()
|
||||
streamEvaluator := NewStreamEvaluator(false)
|
||||
_, err = streamEvaluator.Evaluate(filename, strings.NewReader(yaml), node, printer, "", NewYamlDecoder())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
@@ -293,7 +293,7 @@ func TestPrinterScalarWithLeadingCont(t *testing.T) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
streamEvaluator := NewStreamEvaluator()
|
||||
streamEvaluator := NewStreamEvaluator(false)
|
||||
_, err = streamEvaluator.Evaluate("sample", strings.NewReader(multiDocSample), node, printer, "# blah\n", NewYamlDecoder())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user