Introduced 'format' to encapsulate encoding and decoding formats together

This commit is contained in:
Mike Farah
2024-02-24 16:37:13 +11:00
parent 8f6d642012
commit 447bf28cd8
11 changed files with 253 additions and 250 deletions
+3 -3
View File
@@ -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"
}