mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-04 20:03:04 +02:00
Destroy() does not return error.
This commit is contained in:
parent
a03507227d
commit
a95a987fb6
8 changed files with 37 additions and 63 deletions
|
@ -1,22 +0,0 @@
|
|||
package utils
|
||||
|
||||
import "fmt"
|
||||
|
||||
func ErrorsJoin(errs []error) error {
|
||||
var resErr error
|
||||
|
||||
for _, err := range errs {
|
||||
if err == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if resErr == nil {
|
||||
resErr = err
|
||||
continue
|
||||
}
|
||||
|
||||
resErr = fmt.Errorf("%w; %s", resErr, err.Error())
|
||||
}
|
||||
|
||||
return resErr
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue