Remove json output option

Because the API query uses REST, the JSON exporter doesn't work as expected.
This commit is contained in:
bagtoad 2024-09-29 10:42:54 -06:00
parent 21f0d9466e
commit 1aa2a824ba

View file

@ -18,15 +18,9 @@ type LicenseRenderer interface {
type TableLicenseRenderer struct{}
var licenseFields = []string{
"key",
"name",
}
type ListOptions struct {
IO *iostreams.IOStreams
HTTPClient func() (*http.Client, error)
Exporter cmdutil.Exporter
Config func() (gh.Config, error)
}
@ -50,8 +44,6 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
return listRun(opts)
},
}
// cmdutil.AddFormatFlags(cmd, &opts.Exporter)
cmdutil.AddJSONFlags(cmd, &opts.Exporter, licenseFields)
return cmd
}
@ -76,10 +68,6 @@ func listRun(opts *ListOptions) error {
return cmdutil.NewNoResultsError("no licenses found")
}
if opts.Exporter != nil {
return opts.Exporter.Write(opts.IO, licenses)
}
r := &TableLicenseRenderer{}
return r.Render(licenses, opts)
}