Refactoring Output types

This commit is contained in:
Mike Farah
2024-02-24 14:58:11 +11:00
parent 8a538394a5
commit 571caa696a
9 changed files with 91 additions and 60 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
"strings"
)
func configureEncoder(format PrinterOutputFormat, indent int) Encoder {
func configureEncoder(format *PrinterOutputFormat, indent int) Encoder {
switch format {
case JSONOutputFormat:
return NewJSONEncoder(indent, false, false)
@@ -48,7 +48,7 @@ func encodeToString(candidate *CandidateNode, prefs encoderPreferences) (string,
}
type encoderPreferences struct {
format PrinterOutputFormat
format *PrinterOutputFormat
indent int
}