Skip to content

Commit 2fede22

Browse files
committed
Renamed gRPC response from Category string to Type []string
1 parent 61e3e01 commit 2fede22

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

Diff for: commands/core.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform
6060
Latest: platformRelease.Version.String(),
6161
ManuallyInstalled: platformRelease.Platform.ManuallyInstalled,
6262
Deprecated: platformRelease.Platform.Deprecated,
63-
Category: platformRelease.Platform.Category,
63+
Type: []string{platformRelease.Platform.Category},
6464
}
6565

6666
return result

Diff for: commands/core/search_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestPlatformSearch(t *testing.T) {
6161
Website: "https://www.retrokits.com",
6262
6363
Boards: []*rpc.Board{{Name: "RK002"}},
64-
Category: "Contributed",
64+
Type: []string{"Contributed"},
6565
})
6666
require.Contains(t, res.SearchOutput, &rpc.Platform{
6767
Id: "Retrokits-RK002:arm",
@@ -72,7 +72,7 @@ func TestPlatformSearch(t *testing.T) {
7272
Website: "https://www.retrokits.com",
7373
7474
Boards: []*rpc.Board{{Name: "RK002"}},
75-
Category: "Contributed",
75+
Type: []string{"Contributed"},
7676
})
7777

7878
res, stat = PlatformSearch(&rpc.PlatformSearchRequest{
@@ -92,7 +92,7 @@ func TestPlatformSearch(t *testing.T) {
9292
Website: "https://www.retrokits.com",
9393
9494
Boards: []*rpc.Board{{Name: "RK002"}},
95-
Category: "Contributed",
95+
Type: []string{"Contributed"},
9696
})
9797

9898
// Search the Package Maintainer
@@ -113,7 +113,7 @@ func TestPlatformSearch(t *testing.T) {
113113
Website: "https://www.retrokits.com",
114114
115115
Boards: []*rpc.Board{{Name: "RK002"}},
116-
Category: "Contributed",
116+
Type: []string{"Contributed"},
117117
})
118118
require.Contains(t, res.SearchOutput, &rpc.Platform{
119119
Id: "Retrokits-RK002:arm",
@@ -124,7 +124,7 @@ func TestPlatformSearch(t *testing.T) {
124124
Website: "https://www.retrokits.com",
125125
126126
Boards: []*rpc.Board{{Name: "RK002"}},
127-
Category: "Contributed",
127+
Type: []string{"Contributed"},
128128
})
129129

130130
// Search using the Package name
@@ -145,7 +145,7 @@ func TestPlatformSearch(t *testing.T) {
145145
Website: "https://www.retrokits.com",
146146
147147
Boards: []*rpc.Board{{Name: "RK002"}},
148-
Category: "Contributed",
148+
Type: []string{"Contributed"},
149149
})
150150
require.Contains(t, res.SearchOutput, &rpc.Platform{
151151
Id: "Retrokits-RK002:arm",
@@ -156,7 +156,7 @@ func TestPlatformSearch(t *testing.T) {
156156
Website: "https://www.retrokits.com",
157157
158158
Boards: []*rpc.Board{{Name: "RK002"}},
159-
Category: "Contributed",
159+
Type: []string{"Contributed"},
160160
})
161161

162162
// Search using the Platform name
@@ -177,7 +177,7 @@ func TestPlatformSearch(t *testing.T) {
177177
Website: "https://www.retrokits.com",
178178
179179
Boards: []*rpc.Board{{Name: "RK002"}},
180-
Category: "Contributed",
180+
Type: []string{"Contributed"},
181181
})
182182
require.Contains(t, res.SearchOutput, &rpc.Platform{
183183
Id: "Retrokits-RK002:arm",
@@ -188,7 +188,7 @@ func TestPlatformSearch(t *testing.T) {
188188
Website: "https://www.retrokits.com",
189189
190190
Boards: []*rpc.Board{{Name: "RK002"}},
191-
Category: "Contributed",
191+
Type: []string{"Contributed"},
192192
})
193193

194194
// Search using a board name
@@ -208,7 +208,7 @@ func TestPlatformSearch(t *testing.T) {
208208
Maintainer: "Arduino",
209209
Website: "https://www.arduino.cc/",
210210
211-
Category: "Arduino",
211+
Type: []string{"Arduino"},
212212
Boards: []*rpc.Board{
213213
{Name: "Arduino Yún"},
214214
{Name: "Arduino Uno"},
@@ -255,7 +255,7 @@ func TestPlatformSearch(t *testing.T) {
255255
Maintainer: "Arduino",
256256
Website: "https://www.arduino.cc/",
257257
258-
Category: "Arduino",
258+
Type: []string{"Arduino"},
259259
Boards: []*rpc.Board{
260260
{Name: "Arduino Yún"},
261261
{Name: "Arduino Uno"},

Diff for: rpc/cc/arduino/cli/commands/v1/common.pb.go

+29-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/common.proto

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ message Platform {
8080
bool manually_installed = 9;
8181
// If true this Platform has been deprecated
8282
bool deprecated = 10;
83-
// Category of the platform.
84-
string category = 11;
83+
// Type of the platform.
84+
repeated string type = 11;
8585
}
8686

8787
message InstalledPlatformReference {

0 commit comments

Comments
 (0)