refactor(recipe): remove remaining usage of old recipe struct

This commit is contained in:
2024-07-08 13:15:20 +02:00
parent c1b03bcbd7
commit 5617a9ba07
24 changed files with 167 additions and 189 deletions

View File

@ -8,7 +8,6 @@ import (
"coopcloud.tech/abra/pkg/formatter"
"coopcloud.tech/abra/pkg/lint"
"coopcloud.tech/abra/pkg/log"
recipePkg "coopcloud.tech/abra/pkg/recipe"
"github.com/urfave/cli"
)
@ -29,8 +28,7 @@ var recipeLintCommand = cli.Command{
Action: func(c *cli.Context) error {
recipe := internal.ValidateRecipe(c)
r := recipePkg.Get2(recipe.Name)
if err := r.Ensure(internal.Chaos, internal.Offline); err != nil {
if err := recipe.Ensure(internal.Chaos, internal.Offline); err != nil {
log.Fatal(err)
}
@ -47,7 +45,7 @@ var recipeLintCommand = cli.Command{
}
skipped := false
if rule.Skip(r) {
if rule.Skip(recipe) {
skipped = true
}
@ -58,7 +56,7 @@ var recipeLintCommand = cli.Command{
satisfied := false
if !skipped {
ok, err := rule.Function(r)
ok, err := rule.Function(recipe)
if err != nil {
log.Warn(err)
}