Fix the JSON beautifier flag
This commit is contained in:
@@ -112,11 +112,12 @@ func (res *Result) CSV() []byte {
|
||||
func (res *Result) JSON() []byte {
|
||||
var data []byte
|
||||
|
||||
if command.Opts.EnablePrettyJson {
|
||||
data, _ = json.MarshalIndent(res.Format(), "", " ")
|
||||
} else {
|
||||
if command.Opts.DisablePrettyJson {
|
||||
data, _ = json.Marshal(res.Format())
|
||||
} else {
|
||||
data, _ = json.MarshalIndent(res.Format(), "", " ")
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user