Open kaovilai opened 2 years ago
Unfortunately this parameter is not exposed by the underlying yaml parser (go-yaml) - until it is not much can be done.
As a workaround for this issue I pipe the yaml through a yamlfmt command like yamlfmt -in -formatter indentless_arrays=true
.
that is a cool tip. Thanks!
The kubernetes team have this problem too. They have forked go-yaml and applied a fix: https://github.com/kubernetes-sigs/yaml/blob/master/goyaml.v3/patch.go
Please describe your feature request. A clear and concise description of what the request is and what it would solve. Eg. I wish I could use yq to [...] have custom indent for list/arrays.
related to #194
Note:
Describe the solution you'd like If we have data1.yml like: (please keep to around 10 lines )
And we run a command:
it could output
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here. Would like to avoid indent changes to original file. https://github.com/openshift/oadp-operator/pull/796