Skip to content

Commit e971426

Browse files
authored
Merge pull request #76 from per1234/remove-supportlevel
Remove unused `SupportLevel` database field
2 parents cd44376 + bf78cf2 commit e971426

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

internal/libraries/db/db.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ type DB struct {
4343

4444
// Library is an Arduino library
4545
type Library struct {
46-
Name string
47-
Repository string
48-
SupportLevel string
46+
Name string
47+
Repository string
4948

5049
// Category of the latest release of the library
5150
LatestCategory string

internal/libraries/db/db_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,16 @@ func testerDB() *DB {
3434
tDB := DB{
3535
Libraries: []*Library{
3636
{
37-
Name: "FooLib",
38-
Repository: "https://github.com/Bar/FooLib.git",
39-
SupportLevel: "",
37+
Name: "FooLib",
38+
Repository: "https://github.com/Bar/FooLib.git",
4039
},
4140
{
42-
Name: "BazLib",
43-
Repository: "https://github.com/Bar/BazLib.git",
44-
SupportLevel: "",
41+
Name: "BazLib",
42+
Repository: "https://github.com/Bar/BazLib.git",
4543
},
4644
{
47-
Name: "QuxLib",
48-
Repository: "https://github.com/Zeb/QuxLib.git",
49-
SupportLevel: "",
45+
Name: "QuxLib",
46+
Repository: "https://github.com/Zeb/QuxLib.git",
5047
},
5148
},
5249
Releases: []*Release{

internal/libraries/db/index.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ type indexLibrary struct {
4848
ArchiveFileName string `json:"archiveFileName"`
4949
Size int64 `json:"size"`
5050
Checksum string `json:"checksum"`
51-
52-
SupportLevel string `json:"supportLevel,omitempty"`
5351
}
5452

5553
type indexDependency struct {
@@ -96,7 +94,6 @@ func (db *DB) OutputLibraryIndex() (interface{}, error) {
9694
URL: libraryRelease.URL,
9795
Size: libraryRelease.Size,
9896
Checksum: libraryRelease.Checksum,
99-
SupportLevel: lib.SupportLevel,
10097
Repository: lib.Repository,
10198
ProvidesIncludes: libraryRelease.Includes,
10299
Dependencies: deps,

tests/testdata/test_sync/golden/db.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
{
44
"Name": "SpacebrewYun",
55
"Repository": "https://github.com/arduino-libraries/SpacebrewYun.git",
6-
"SupportLevel": "",
76
"LatestCategory": "Communication"
87
},
98
{
109
"Name": "ArduinoCloudThing",
1110
"Repository": "https://github.com/arduino-libraries/ArduinoCloudThing.git",
12-
"SupportLevel": "",
1311
"LatestCategory": "Communication"
1412
}
1513
],

0 commit comments

Comments
 (0)