Skip to content

Commit 1fe36ff

Browse files
committed
minor changes
1 parent 87159b9 commit 1fe36ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/output/output.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ func (o *Result) Printed(result string) bool {
4444
return true
4545
}
4646

47-
// JSONOutput checks and prints JSON output.
47+
// JSONOutput marshals and prints the JSON output.
4848
func JSONOutput(json *ResultData) {
49-
o, err := FormatJSON(json)
49+
data, err := FormatJSON(json)
5050
if err != nil {
5151
gologger.Error().Msg(err.Error())
52-
} else {
53-
fmt.Println(string(o))
52+
return
5453
}
54+
55+
fmt.Println(string(data))
5556
}

0 commit comments

Comments
 (0)