refactor: more conventional name for method
This commit is contained in:
parent
60a70d2d83
commit
337d3e9ae1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue