diff --git a/path.go b/path.go index 9ecadc68..050bed81 100644 --- a/path.go +++ b/path.go @@ -783,8 +783,6 @@ func (c *Constraint) CheckConstraint(param string) bool { if match := c.RegexCompiler.MatchString(param); !match { return false } - default: - return false } return err == nil diff --git a/path_testcases_test.go b/path_testcases_test.go index dc4aff48..27746636 100644 --- a/path_testcases_test.go +++ b/path_testcases_test.go @@ -721,20 +721,6 @@ func init() { {url: "/api/v1/abc", params: nil, match: false}, }, }, - // Add test case for default branch (unknown constraint type) - { - pattern: "/api/v1/:param", - testCases: []routeTestCase{ - {url: "/api/v1/anyvalue", params: nil, match: false}, - }, - }, - // Test case for constraint with insufficient data - { - pattern: "/api/v1/:param", - testCases: []routeTestCase{ - {url: "/api/v1/anyvalue", params: nil, match: false}, - }, - }, }..., ) }