Fixing Unwrapable interface

This commit is contained in:
Foil-hat-guy 2025-05-08 11:35:48 +03:00
parent f7e0f38316
commit ab36acbd66
No known key found for this signature in database
GPG key ID: 221CC305A7B23591

View file

@ -22,7 +22,7 @@ func enshureUnwrapable(err error) error {
if isUnwrapable(err) { if isUnwrapable(err) {
return err return err
} }
return fmt.Errorf(err.Error()) return fmt.Errorf("%v",err)
} }
func filterNilErrors(errs []error) (notNilErrs []error) { func filterNilErrors(errs []error) (notNilErrs []error) {
@ -35,9 +35,7 @@ func filterNilErrors(errs []error) (notNilErrs []error) {
} }
func Join(errs ...error) (result error) { func Join(errs ...error) (result error) {
fmt.Println(errs)
errs = filterNilErrors(errs) errs = filterNilErrors(errs)
fmt.Println(errs)
if len(errs) == 0 { if len(errs) == 0 {
return nil return nil
} }