From 1aa2a824bac6b549ab6e07aff3ae87ec1cd686aa Mon Sep 17 00:00:00 2001 From: bagtoad <47394200+BagToad@users.noreply.github.com> Date: Sun, 29 Sep 2024 10:42:54 -0600 Subject: [PATCH] Remove json output option Because the API query uses REST, the JSON exporter doesn't work as expected. --- pkg/cmd/repo/license/list/list.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkg/cmd/repo/license/list/list.go b/pkg/cmd/repo/license/list/list.go index 4e52a5c6c..8d369c4ee 100644 --- a/pkg/cmd/repo/license/list/list.go +++ b/pkg/cmd/repo/license/list/list.go @@ -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) }