From 337d3e9ae12e018d8d6dac2573b40e520be2a4c7 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Mon, 26 Jul 2021 17:50:40 +0200 Subject: [PATCH] refactor: more conventional name for method --- cli/recipe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/recipe.go b/cli/recipe.go index 780f0453c..f97ff3fab 100644 --- a/cli/recipe.go +++ b/cli/recipe.go @@ -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)