forked from toolshed/abra
refactor: centralise recipe validation
This commit is contained in:
@ -19,16 +19,21 @@ var recipeListCommand = &cli.Command{
|
||||
if err != nil {
|
||||
logrus.Fatal(err.Error())
|
||||
}
|
||||
|
||||
recipes := catl.Flatten()
|
||||
sort.Sort(catalogue.ByRecipeName(recipes))
|
||||
|
||||
tableCol := []string{"Name", "Category", "Status"}
|
||||
table := formatter.CreateTable(tableCol)
|
||||
|
||||
for _, recipe := range recipes {
|
||||
status := fmt.Sprintf("%v", recipe.Features.Status)
|
||||
tableRow := []string{recipe.Name, recipe.Category, status}
|
||||
table.Append(tableRow)
|
||||
}
|
||||
|
||||
table.Render()
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user