Skip to content

Commit

Permalink
avoid error field checking
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Sep 25, 2020
1 parent 78025b1 commit 5f1461e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tfexec/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,8 @@ func (e *ErrVersionMismatch) Error() string {
}

func (e *ErrVersionMismatch) Is(target error) bool {
err, ok := target.(*ErrVersionMismatch)
if !ok {
return false
}
return err.Actual == e.Actual &&
err.MaxExclusive == e.MaxExclusive &&
err.MinInclusive == e.MinInclusive
_, ok := target.(*ErrVersionMismatch)
return ok
}

type ErrNoInit struct {
Expand Down

0 comments on commit 5f1461e

Please sign in to comment.