File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,16 @@ func runListCommand(cmd *cobra.Command, args []string) {
55
55
}
56
56
lm := commands .InitLibraryManager (commands .Config , pm )
57
57
58
- res := listLibraries (lm , listFlags .updatable )
58
+ res := ListLibraries (lm , listFlags .updatable )
59
59
if len (res .Libraries ) > 0 {
60
60
formatter .Print (res )
61
61
}
62
62
logrus .Info ("Done" )
63
63
}
64
64
65
- func listLibraries (lm * librariesmanager.LibrariesManager , updatable bool ) * output.InstalledLibraries {
65
+ // ListLibraries returns the list of installed libraries. If updatable is true it
66
+ // returns only the libraries that may be updated.
67
+ func ListLibraries (lm * librariesmanager.LibrariesManager , updatable bool ) * output.InstalledLibraries {
66
68
res := & output.InstalledLibraries {}
67
69
for _ , libAlternatives := range lm .Libraries {
68
70
for _ , lib := range libAlternatives .Alternatives {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ func initUpgradeCommand() *cobra.Command {
39
39
40
40
func runUpgradeCommand (cmd * cobra.Command , args []string ) {
41
41
lm := commands .InitLibraryManager (commands .Config , nil )
42
- list := listLibraries (lm , true )
42
+ list := ListLibraries (lm , true )
43
43
libReleases := []* librariesindex.Release {}
44
44
for _ , upgradeDesc := range list .Libraries {
45
45
libReleases = append (libReleases , upgradeDesc .Available )
You can’t perform that action at this time.
0 commit comments