yq/pkg/yqlib/properties.go

26 lines
603 B
Go
Raw Permalink Normal View History

package yqlib
type PropertiesPreferences struct {
2024-02-24 04:14:21 +00:00
UnwrapScalar bool
KeyValueSeparator string
UseArrayBrackets bool
}
func NewDefaultPropertiesPreferences() PropertiesPreferences {
return PropertiesPreferences{
2024-02-24 04:14:21 +00:00
UnwrapScalar: true,
KeyValueSeparator: " = ",
UseArrayBrackets: false,
}
}
2024-02-24 04:14:21 +00:00
func (p *PropertiesPreferences) Copy() PropertiesPreferences {
return PropertiesPreferences{
UnwrapScalar: p.UnwrapScalar,
KeyValueSeparator: p.KeyValueSeparator,
UseArrayBrackets: p.UseArrayBrackets,
}
}
var ConfiguredPropertiesPreferences = NewDefaultPropertiesPreferences()