Fixing Unwrapable interface
This commit is contained in:
parent
f7e0f38316
commit
ab36acbd66
1 changed files with 1 additions and 3 deletions
4
error.go
4
error.go
|
@ -22,7 +22,7 @@ func enshureUnwrapable(err error) error {
|
|||
if isUnwrapable(err) {
|
||||
return err
|
||||
}
|
||||
return fmt.Errorf(err.Error())
|
||||
return fmt.Errorf("%v",err)
|
||||
}
|
||||
|
||||
func filterNilErrors(errs []error) (notNilErrs []error) {
|
||||
|
@ -35,9 +35,7 @@ func filterNilErrors(errs []error) (notNilErrs []error) {
|
|||
}
|
||||
|
||||
func Join(errs ...error) (result error) {
|
||||
fmt.Println(errs)
|
||||
errs = filterNilErrors(errs)
|
||||
fmt.Println(errs)
|
||||
if len(errs) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue