component/provision: Make components purgable
This commit is contained in:
parent
845e927117
commit
4358320433
5 changed files with 46 additions and 31 deletions
11
pkg/errorx/errorx.go
Normal file
11
pkg/errorx/errorx.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue