File tree 1 file changed +5
-5
lines changed
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) {
88
88
// output from this command requires special formatting, let's create a dedicated
89
89
// feedback.Result implementation
90
90
type searchResults struct {
91
- platforms []* result.PlatformSummary
91
+ Platforms []* result.PlatformSummary `json:"platforms"`
92
92
}
93
93
94
94
func newSearchResult (in []* rpc.PlatformSummary ) * searchResults {
95
95
res := & searchResults {}
96
96
for _ , platformSummary := range in {
97
- res .platforms = append (res .platforms , result .NewPlatformSummary (platformSummary ))
97
+ res .Platforms = append (res .Platforms , result .NewPlatformSummary (platformSummary ))
98
98
}
99
99
return res
100
100
}
101
101
102
102
func (sr searchResults ) Data () interface {} {
103
- return sr . platforms
103
+ return sr
104
104
}
105
105
106
106
func (sr searchResults ) String () string {
107
- if len (sr .platforms ) > 0 {
107
+ if len (sr .Platforms ) > 0 {
108
108
t := table .New ()
109
109
t .SetHeader (tr ("ID" ), tr ("Version" ), tr ("Name" ))
110
- for _ , platform := range sr .platforms {
110
+ for _ , platform := range sr .Platforms {
111
111
name := ""
112
112
if latest := platform .GetLatestRelease (); latest != nil {
113
113
name = latest .Name
You can’t perform that action at this time.
0 commit comments