Skip to content

Commit 029187e

Browse files
committedSep 8, 2023
Remove redundant error matching.
It seems that all tests are fine without the second comparison.
1 parent a3f8fcc commit 029187e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (e *ErrorMap) Response(response func(c *gin.Context)) *ErrorMap {
4444

4545
func (e *ErrorMap) matchError(actual error) bool {
4646
for _, expected := range e.errors {
47-
if errors.Is(actual, expected) || errors.Is(expected, actual) {
47+
if errors.Is(actual, expected) {
4848
return true
4949
}
5050
}

0 commit comments

Comments
 (0)