Make seq indent configurable and add retain seq indent functionality

This commit is contained in:
Phani Teja Marupaka
2021-07-07 15:33:09 -07:00
parent e1804cbc76
commit ed38b5fe2b
7 changed files with 509 additions and 6 deletions

View File

@@ -19,6 +19,16 @@ const DefaultSequenceStyle = CompactSequenceStyle
var sequenceIndentationStyle = DefaultSequenceStyle
var indent = DefaultIndent
// SetSequenceIndentationStyle sets the sequenceIndentationStyle variable
func SetSequenceIndentationStyle(style string) {
sequenceIndentationStyle = style
}
// SequenceIndentationStyle returns the value of sequenceIndentationStyle
func SequenceIndentationStyle() string {
return sequenceIndentationStyle
}
// Expose the yaml.v3 functions so this package can be used as a replacement
type Decoder = yaml.Decoder