Remove json output option
Because the API query uses REST, the JSON exporter doesn't work as expected.
This commit is contained in:
parent
21f0d9466e
commit
1aa2a824ba
1 changed files with 0 additions and 12 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue