mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
2865022cf8
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>
14 lines
280 B
Go
14 lines
280 B
Go
package yqlib
|
|
|
|
type PropertiesPreferences struct {
|
|
KeyValueSeparator string
|
|
}
|
|
|
|
func NewDefaultPropertiesPreferences() PropertiesPreferences {
|
|
return PropertiesPreferences{
|
|
KeyValueSeparator: " = ",
|
|
}
|
|
}
|
|
|
|
var ConfiguredPropertiesPreferences = NewDefaultPropertiesPreferences()
|