File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,26 +88,26 @@ func runSearchCommand(cmd *cobra.Command, args []string) {
8888// output from this command requires special formatting, let's create a dedicated
8989// feedback.Result implementation
9090type searchResults struct {
91- platforms []* result.PlatformSummary
91+ Platforms []* result.PlatformSummary `json:"platforms"`
9292}
9393
9494func newSearchResult (in []* rpc.PlatformSummary ) * searchResults {
9595 res := & searchResults {}
9696 for _ , platformSummary := range in {
97- res .platforms = append (res .platforms , result .NewPlatformSummary (platformSummary ))
97+ res .Platforms = append (res .Platforms , result .NewPlatformSummary (platformSummary ))
9898 }
9999 return res
100100}
101101
102102func (sr searchResults ) Data () interface {} {
103- return sr . platforms
103+ return sr
104104}
105105
106106func (sr searchResults ) String () string {
107- if len (sr .platforms ) > 0 {
107+ if len (sr .Platforms ) > 0 {
108108 t := table .New ()
109109 t .SetHeader (tr ("ID" ), tr ("Version" ), tr ("Name" ))
110- for _ , platform := range sr .platforms {
110+ for _ , platform := range sr .Platforms {
111111 name := ""
112112 if latest := platform .GetLatestRelease (); latest != nil {
113113 name = latest .Name
You can’t perform that action at this time.
0 commit comments