mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 18:24:57 +08:00
Auto style when adding to empty maps/arrays
This commit is contained in:
@@ -19,7 +19,7 @@ var collectObjectOperatorScenarios = []expressionScenario{
|
||||
document: "a: []",
|
||||
expression: `.a += [{"key": "att2", "value": "val2"}]`,
|
||||
expected: []string{
|
||||
"D0, P[], (doc)::a: [{key: att2, value: val2}]\n",
|
||||
"D0, P[], (doc)::a:\n - key: att2\n value: val2\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user