Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pyama86 committed Dec 20, 2023
1 parent 7a960db commit 0c9f99f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion country_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (l *CountryLimiter) Rule(r *http.Request) (*rl.Rule, error) {
return noLimit, nil
}

if _, ok := l.countries["*"]; !ok {
if _, ok := l.countries["*"]; ok {
return limit, nil

}
Expand Down
2 changes: 1 addition & 1 deletion country_limiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestCountryLimiter(t *testing.T) {
expectedCountry: "BT",
countries: []string{"*"},
skipCountries: []string{"US"},
allowed: true,
allowed: false,
expectedError: false,
},
}
Expand Down
12 changes: 6 additions & 6 deletions coverage.out
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ github.com/2manymws/rlutils/country_limiter.go:79.2,86.19 3 4
github.com/2manymws/rlutils/country_limiter.go:86.19,88.3 1 1
github.com/2manymws/rlutils/country_limiter.go:90.2,90.43 1 3
github.com/2manymws/rlutils/country_limiter.go:90.43,92.3 1 0
github.com/2manymws/rlutils/country_limiter.go:94.2,94.36 1 3
github.com/2manymws/rlutils/country_limiter.go:94.36,97.3 1 3
github.com/2manymws/rlutils/country_limiter.go:99.2,99.39 1 0
github.com/2manymws/rlutils/country_limiter.go:99.39,105.3 1 0
github.com/2manymws/rlutils/country_limiter.go:106.2,106.36 1 0
github.com/2manymws/rlutils/country_limiter.go:94.2,94.35 1 3
github.com/2manymws/rlutils/country_limiter.go:94.35,97.3 1 0
github.com/2manymws/rlutils/country_limiter.go:99.2,99.39 1 3
github.com/2manymws/rlutils/country_limiter.go:99.39,105.3 1 2
github.com/2manymws/rlutils/country_limiter.go:106.2,106.36 1 1
github.com/2manymws/rlutils/country_limiter.go:109.69,117.16 3 10
github.com/2manymws/rlutils/country_limiter.go:117.16,119.3 1 2
github.com/2manymws/rlutils/country_limiter.go:121.2,121.36 1 8
Expand All @@ -41,7 +41,7 @@ github.com/2manymws/rlutils/get_parameter_limiter.go:35.45,37.2 1 0
github.com/2manymws/rlutils/get_parameter_limiter.go:39.71,40.27 1 3
github.com/2manymws/rlutils/get_parameter_limiter.go:40.27,42.3 1 0
github.com/2manymws/rlutils/get_parameter_limiter.go:43.2,43.36 1 3
github.com/2manymws/rlutils/get_parameter_limiter.go:43.36,44.32 1 3
github.com/2manymws/rlutils/get_parameter_limiter.go:43.36,44.32 1 4
github.com/2manymws/rlutils/get_parameter_limiter.go:44.32,50.4 1 2
github.com/2manymws/rlutils/get_parameter_limiter.go:53.2,53.36 1 1
github.com/2manymws/rlutils/get_parameter_limiter.go:56.78,58.2 1 0
Expand Down

0 comments on commit 0c9f99f

Please sign in to comment.