refactor: more conventional name for method

This commit is contained in:
decentral1se 2021-07-26 17:50:40 +02:00
parent 60a70d2d83
commit 337d3e9ae1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ type App struct {
type Name = string
type AppsCatalogue map[Name]App
func (a AppsCatalogue) ToList() []App {
func (a AppsCatalogue) Flatten() []App {
apps := make([]App, 0, len(a))
for name := range a {
apps = append(apps, a[name])
@ -175,7 +175,7 @@ var recipeListCommand = &cli.Command{
if err != nil {
logrus.Fatal(err.Error())
}
apps := catalogue.ToList()
apps := catalogue.Flatten()
sort.Sort(ByAppName(apps))
tableCol := []string{"Name", "Category", "Status"}
table := createTable(tableCol)