Inital commit

This commit is contained in:
2026-01-02 05:00:07 +01:00
commit 950aaffcc7
14 changed files with 1864 additions and 0 deletions

24
recipe/recipe.go Normal file
View File

@@ -0,0 +1,24 @@
package recipe
import (
"autobrew/action"
"autobrew/ingredient"
)
type Recipe struct {
Steps []Step
Ingredients []ingredient.Ingredient
}
func (r *Recipe) LoadIngredients() {
for _, step := range r.Steps {
if step.Action == action.Prepare {
for _, i := range step.Ingredients {
if i.IngredientType != ingredient.Base {
r.Ingredients = append(r.Ingredients, i)
}
}
break
}
}
}