Skip to content

Commit adacc60

Browse files
committed
Shorten printResults util
1 parent 8a8ff59 commit adacc60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/util/output.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func printResults[T any](results []T, label string, format func(any) string, mod
5959
Label string `json:"label"`
6060
Results []T `json:"results"`
6161
}
62-
wrapped := &wrapper{Label: label, Results: results}
63-
jsonData, err := json.MarshalIndent(wrapped, "", " ")
62+
jsonData, err := json.MarshalIndent(&wrapper{Label: label, Results: results}, "", " ")
6463
if err != nil {
6564
fmt.Printf("Cannot print %s for %s: %v\n", mode, label, err)
6665
return

0 commit comments

Comments
 (0)