From f638b6a16b8bb7de073a43df55444ccc8e96aa90 Mon Sep 17 00:00:00 2001 From: p4u1 Date: Mon, 8 Jul 2024 13:16:47 +0200 Subject: [PATCH] refator(recipe): remove old struct --- pkg/recipe/recipe.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 4affadd8..46d618ef 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -122,35 +122,6 @@ type Features struct { SSO string `json:"sso"` } -// Recipe represents a recipe. -type Recipe struct { - Name string - Meta RecipeMeta -} - -// Get retrieves a recipe. -func Get(recipeName string, offline bool) (Recipe, error) { - r := Get2(recipeName) - if err := r.EnsureExists(); err != nil { - return Recipe{}, err - } - - meta, err := GetRecipeMeta(r.Name, offline) - if err != nil { - switch err.(type) { - case RecipeMissingFromCatalogue: - meta = RecipeMeta{} - default: - return Recipe{}, err - } - } - - return Recipe{ - Name: recipeName, - Meta: meta, - }, nil -} - func Get2(name string) Recipe2 { dir := path.Join(config.RECIPES_DIR, name) return Recipe2{