mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-30 20:35:13 +08:00
Refactoring Yaml encoder prefs
This commit is contained in:
@@ -21,7 +21,10 @@ func configureEncoder(format *PrinterOutputFormat, indent int) Encoder {
|
||||
case TSVOutputFormat:
|
||||
return NewCsvEncoder(ConfiguredTsvPreferences)
|
||||
case YamlOutputFormat:
|
||||
return NewYamlEncoder(indent, false, ConfiguredYamlPreferences)
|
||||
var prefs = ConfiguredYamlPreferences.Copy()
|
||||
prefs.Indent = indent
|
||||
prefs.ColorsEnabled = false
|
||||
return NewYamlEncoder(prefs)
|
||||
case XMLOutputFormat:
|
||||
var xmlPrefs = ConfiguredXMLPreferences.Copy()
|
||||
xmlPrefs.Indent = indent
|
||||
|
||||
Reference in New Issue
Block a user