mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-14 07:08:06 +00:00
26 lines
603 B
Go
26 lines
603 B
Go
package yqlib
|
|
|
|
type PropertiesPreferences struct {
|
|
UnwrapScalar bool
|
|
KeyValueSeparator string
|
|
UseArrayBrackets bool
|
|
}
|
|
|
|
func NewDefaultPropertiesPreferences() PropertiesPreferences {
|
|
return PropertiesPreferences{
|
|
UnwrapScalar: true,
|
|
KeyValueSeparator: " = ",
|
|
UseArrayBrackets: false,
|
|
}
|
|
}
|
|
|
|
func (p *PropertiesPreferences) Copy() PropertiesPreferences {
|
|
return PropertiesPreferences{
|
|
UnwrapScalar: p.UnwrapScalar,
|
|
KeyValueSeparator: p.KeyValueSeparator,
|
|
UseArrayBrackets: p.UseArrayBrackets,
|
|
}
|
|
}
|
|
|
|
var ConfiguredPropertiesPreferences = NewDefaultPropertiesPreferences()
|