Skip to content

Commit

Permalink
constants
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Jan 24, 2025
1 parent 0d5a796 commit f677318
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,19 +483,19 @@ func (o *packageListOptions) run(ctx context.Context) error {
}

switch o.outputFormat {
case "json":
case outputJSON:
output, err := json.MarshalIndent(packageList, "", " ")
if err != nil {
return err
}
fmt.Fprintln(o.outputWriter, string(output))
case "yaml":
case outputYAML:
output, err := goyaml.Marshal(packageList)
if err != nil {
return err
}
fmt.Fprint(o.outputWriter, string(output))
case "table":
case outputTable:
header := []string{"Package", "Version", "Components"}
var packageData [][]string
for _, info := range packageList {
Expand Down

0 comments on commit f677318

Please sign in to comment.