Simplify MatchUserWithAllowedRegexes
This used to return an error back when it was dealing with wildcards (which may or may not have compiled to a valid regex). But it now deals with pre-compiled regexes and has no chance of failing, so we need no `error` returns.
This commit is contained in:
@@ -202,10 +202,7 @@ func TestMatch(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
actualResult, err := MatchUserWithAllowedRegexes(testData.checkedValue, *allowedUserRegexes)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
actualResult := MatchUserWithAllowedRegexes(testData.checkedValue, *allowedUserRegexes)
|
||||
|
||||
if actualResult == testData.expectedResult {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user