mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Refactoring Output types
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user