mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-01 18:01:40 +00:00
Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/5295-kyaml/README.md Co-authored-by: Codex <codex@openai.com> Generated-with: OpenAI Codex CLI (partial) Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
31 lines
667 B
Go
31 lines
667 B
Go
//go:build !yq_nokyaml
|
|
|
|
package yqlib
|
|
|
|
type KYamlPreferences struct {
|
|
Indent int
|
|
ColorsEnabled bool
|
|
PrintDocSeparators bool
|
|
UnwrapScalar bool
|
|
}
|
|
|
|
func NewDefaultKYamlPreferences() KYamlPreferences {
|
|
return KYamlPreferences{
|
|
Indent: 2,
|
|
ColorsEnabled: false,
|
|
PrintDocSeparators: true,
|
|
UnwrapScalar: true,
|
|
}
|
|
}
|
|
|
|
func (p *KYamlPreferences) Copy() KYamlPreferences {
|
|
return KYamlPreferences{
|
|
Indent: p.Indent,
|
|
ColorsEnabled: p.ColorsEnabled,
|
|
PrintDocSeparators: p.PrintDocSeparators,
|
|
UnwrapScalar: p.UnwrapScalar,
|
|
}
|
|
}
|
|
|
|
var ConfiguredKYamlPreferences = NewDefaultKYamlPreferences()
|