mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 00:54:51 +08:00
Introduced 'format' to encapsulate encoding and decoding formats together
This commit is contained in:
@@ -33,13 +33,13 @@ type multiPrintWriter struct {
|
||||
index int
|
||||
}
|
||||
|
||||
func NewMultiPrinterWriter(expression *ExpressionNode, format *PrinterOutputFormat) PrinterWriter {
|
||||
func NewMultiPrinterWriter(expression *ExpressionNode, format *Format) PrinterWriter {
|
||||
extension := "yml"
|
||||
|
||||
switch format {
|
||||
case JSONOutputFormat:
|
||||
case JSONFormat:
|
||||
extension = "json"
|
||||
case PropsOutputFormat:
|
||||
case PropertiesFormat:
|
||||
extension = "properties"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user