component/provision: Make components purgable

This commit is contained in:
Tom Wiesing 2022-10-04 13:27:55 +02:00
parent 845e927117
commit 4358320433
No known key found for this signature in database
5 changed files with 46 additions and 31 deletions

11
pkg/errorx/errorx.go Normal file
View file

@ -0,0 +1,11 @@
package errorx
// First returns the first non-nil error, or nil otherwise.
func First(errors ...error) error {
for _, err := range errors {
if err != nil {
return err
}
}
return nil
}