Skip to content

Commit

Permalink
Add FilterOutIngredients
Browse files Browse the repository at this point in the history
  • Loading branch information
Naatan committed Sep 18, 2024
1 parent 4343122 commit 56e713f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/buildplan/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,12 @@ func FilterNotBuild() FilterArtifact {
return a.Status != types.ArtifactSucceeded
}
}

type FilterOutIngredients struct {
Ingredients IngredientIDMap
}

func (f FilterOutIngredients) Filter(i *Ingredient) bool {
_, blacklist := f.Ingredients[i.IngredientID]
return !blacklist
}

0 comments on commit 56e713f

Please sign in to comment.