File tree 2 files changed +18
-3
lines changed
arduino/libraries/librariesindex
2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ type Library struct {
45
45
type Release struct {
46
46
Author string
47
47
Version * semver.Version
48
- Dependencies []* Dependency
48
+ Dependencies []semver. Dependency
49
49
Maintainer string
50
50
Sentence string
51
51
Paragraph string
@@ -58,6 +58,21 @@ type Release struct {
58
58
Library * Library `json:"-"`
59
59
}
60
60
61
+ // GetName returns the name of this library.
62
+ func (r * Release ) GetName () string {
63
+ return r .Library .Name
64
+ }
65
+
66
+ // GetVersion returns the version of this library.
67
+ func (r * Release ) GetVersion () * semver.Version {
68
+ return r .Version
69
+ }
70
+
71
+ // GetDependencies returns the dependencies of this library.
72
+ func (r * Release ) GetDependencies () []semver.Dependency {
73
+ return r .Dependencies
74
+ }
75
+
61
76
// Dependency is a library dependency
62
77
type Dependency struct {
63
78
Name string
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ func (indexLib *indexRelease) extractReleaseIn(library *Library) {
118
118
}
119
119
}
120
120
121
- func (indexLib * indexRelease ) extractDependencies () []* Dependency {
122
- res := []* Dependency {}
121
+ func (indexLib * indexRelease ) extractDependencies () []semver. Dependency {
122
+ res := []semver. Dependency {}
123
123
if indexLib .Dependencies == nil || len (indexLib .Dependencies ) == 0 {
124
124
return res
125
125
}
You can’t perform that action at this time.
0 commit comments