New fix
This commit is contained in:
parent
b912e0a803
commit
f5d30ae155
1 changed files with 2 additions and 3 deletions
5
error.go
5
error.go
|
@ -2,7 +2,6 @@ package stty
|
|||
|
||||
import(
|
||||
"fmt"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type unwraperr interface {
|
||||
|
@ -21,9 +20,9 @@ func isUnwrapable(err error) bool {
|
|||
|
||||
func enshureUnwrapable(err error) error {
|
||||
if isUnwrapable(err) {
|
||||
return err
|
||||
return fmt.Errorf(err.Error())
|
||||
}
|
||||
return errors.New(err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
func filterNilErrors(errs []error) (notNilErrs []error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue