return JSON results in slice instead of table
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
11eba5e25d
commit
338f9cf78c
2 changed files with 2 additions and 11 deletions
|
|
@ -143,12 +143,7 @@ func runInspect(opts *Options) error {
|
|||
jsonResults[i] = string(jsonBytes)
|
||||
}
|
||||
|
||||
rows := make([][]string, 1)
|
||||
rows[0] = jsonResults
|
||||
if err = opts.Logger.PrintTableToStdOut(nil, rows); err != nil {
|
||||
return fmt.Errorf("failed to print output as JSON: %w", err)
|
||||
}
|
||||
|
||||
fmt.Fprintf(opts.Logger.IO.Out, "%v", jsonResults)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,11 +208,7 @@ func runVerify(opts *Options) error {
|
|||
jsonResults[i] = string(jsonBytes)
|
||||
}
|
||||
|
||||
rows := make([][]string, 1)
|
||||
rows[0] = jsonResults
|
||||
if err := opts.Logger.PrintTableToStdOut(nil, rows); err != nil {
|
||||
return fmt.Errorf("failed to print JSON output")
|
||||
}
|
||||
fmt.Fprintf(opts.Logger.IO.Out, "%v", jsonResults)
|
||||
}
|
||||
|
||||
// All attestations passed verification and policy evaluation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue