@@ -89,32 +89,32 @@ func GetList(inst *rpc.Instance, all bool, updatableOnly bool) []*rpc.PlatformSu
89
89
func newCoreListResult (in []* rpc.PlatformSummary , updatableOnly bool ) * coreListResult {
90
90
res := & coreListResult {updatableOnly : updatableOnly }
91
91
for _ , platformSummary := range in {
92
- res .platforms = append (res .platforms , result .NewPlatformSummary (platformSummary ))
92
+ res .Platforms = append (res .Platforms , result .NewPlatformSummary (platformSummary ))
93
93
}
94
94
return res
95
95
}
96
96
97
97
type coreListResult struct {
98
- platforms []* result.PlatformSummary
98
+ Platforms []* result.PlatformSummary `json:"platforms"`
99
99
updatableOnly bool
100
100
}
101
101
102
102
// Data implements Result interface
103
103
func (ir coreListResult ) Data () interface {} {
104
- return ir . platforms
104
+ return ir
105
105
}
106
106
107
107
// String implements Result interface
108
108
func (ir coreListResult ) String () string {
109
- if len (ir .platforms ) == 0 {
109
+ if len (ir .Platforms ) == 0 {
110
110
if ir .updatableOnly {
111
111
return tr ("All platforms are up to date." )
112
112
}
113
113
return tr ("No platforms installed." )
114
114
}
115
115
t := table .New ()
116
116
t .SetHeader (tr ("ID" ), tr ("Installed" ), tr ("Latest" ), tr ("Name" ))
117
- for _ , platform := range ir .platforms {
117
+ for _ , platform := range ir .Platforms {
118
118
latestVersion := platform .LatestVersion .String ()
119
119
if latestVersion == "" {
120
120
latestVersion = "n/a"
0 commit comments