mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-31 13:05:00 +08:00
Add --properties-separator option (#1951)
This commit adds the --properties-separator option, which lets users specify the separator used between keys and values in the properties output format. This is done by adjusting the value of github.com/magiconair/properties#Properties.WriteSeparator at encode time. Some refactoring of the properties encoder unit tests was done to make it easier to write unit tests that include different separator values. Fixes: #1864 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
This commit is contained in:
@@ -14,7 +14,7 @@ func configureEncoder(format PrinterOutputFormat, indent int) Encoder {
|
||||
case JSONOutputFormat:
|
||||
return NewJSONEncoder(indent, false, false)
|
||||
case PropsOutputFormat:
|
||||
return NewPropertiesEncoder(true)
|
||||
return NewPropertiesEncoder(true, ConfiguredPropertiesPreferences)
|
||||
case CSVOutputFormat:
|
||||
return NewCsvEncoder(ConfiguredCsvPreferences)
|
||||
case TSVOutputFormat:
|
||||
|
||||
Reference in New Issue
Block a user