From 5f1461e1232e6f8a612e702d3cee8070293a46ee Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 25 Sep 2020 10:25:22 +0100 Subject: [PATCH] avoid error field checking --- tfexec/errors.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tfexec/errors.go b/tfexec/errors.go index e7a6c804..75e62ae1 100644 --- a/tfexec/errors.go +++ b/tfexec/errors.go @@ -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 {