Rework variables name, and logic to check IPs with strategy

This commit is contained in:
MathieuHa
2022-11-19 13:27:51 +01:00
parent 6b7f8655ac
commit 73374ccefe
6 changed files with 44 additions and 58 deletions
-4
View File
@@ -20,10 +20,6 @@ type Checker struct {
// NewChecker builds a new Checker given a list of CIDR-Strings to trusted IPs.
func NewChecker(trustedIPs []string) (*Checker, error) {
if len(trustedIPs) == 0 {
return nil, errors.New("no trusted IPs provided")
}
checker := &Checker{}
for _, ipMask := range trustedIPs {