@@ -27,16 +27,16 @@ import (
27
27
"github.com/arduino/arduino-cli/rpc"
28
28
)
29
29
30
- type InstalledLib struct {
31
- Library * libraries.Library `json:"library"`
32
- Available * librariesindex.Release `omitempy,json:"available"`
30
+ type installedLib struct {
31
+ Library * libraries.Library
32
+ Available * librariesindex.Release
33
33
}
34
34
35
35
func LibraryList (ctx context.Context , req * rpc.LibraryListReq ) (* rpc.LibraryListResp , error ) {
36
-
37
36
lm := commands .GetLibraryManager (req )
37
+
38
38
instaledLib := []* rpc.InstalledLibrary {}
39
- res := ListLibraries (lm , req .GetUpdatable (), req .GetAll ())
39
+ res := listLibraries (lm , req .GetUpdatable (), req .GetAll ())
40
40
if len (res ) > 0 {
41
41
for _ , lib := range res {
42
42
libtmp := GetOutputLibrary (lib .Library )
@@ -52,11 +52,10 @@ func LibraryList(ctx context.Context, req *rpc.LibraryListReq) (*rpc.LibraryList
52
52
return & rpc.LibraryListResp {}, nil
53
53
}
54
54
55
- // ListLibraries returns the list of installed libraries. If updatable is true it
55
+ // listLibraries returns the list of installed libraries. If updatable is true it
56
56
// returns only the libraries that may be updated.
57
- func ListLibraries (lm * librariesmanager.LibrariesManager , updatable bool , all bool ) []* InstalledLib {
58
-
59
- res := []* InstalledLib {}
57
+ func listLibraries (lm * librariesmanager.LibrariesManager , updatable bool , all bool ) []* installedLib {
58
+ res := []* installedLib {}
60
59
for _ , libAlternatives := range lm .Libraries {
61
60
for _ , lib := range libAlternatives .Alternatives {
62
61
if ! all {
@@ -71,7 +70,7 @@ func ListLibraries(lm *librariesmanager.LibrariesManager, updatable bool, all bo
71
70
continue
72
71
}
73
72
}
74
- res = append (res , & InstalledLib {
73
+ res = append (res , & installedLib {
75
74
Library : lib ,
76
75
Available : available ,
77
76
})
@@ -117,7 +116,7 @@ func GetOutputLibrary(lib *libraries.Library) *rpc.Library {
117
116
RealName : lib .RealName ,
118
117
DotALinkage : lib .DotALinkage ,
119
118
Precompiled : lib .Precompiled ,
120
- LDflags : lib .LDflags ,
119
+ LdFlags : lib .LDflags ,
121
120
IsLegacy : lib .IsLegacy ,
122
121
Version : lib .Version .String (),
123
122
License : lib .LDflags ,
0 commit comments