🍱 fix loging

This commit is contained in:
Max Lerebourg
2022-11-19 22:18:47 +01:00
parent 15bca90b18
commit 72be1a68f5
+1 -2
View File
@@ -3,7 +3,6 @@
package ip package ip
import ( import (
"errors"
"fmt" "fmt"
"net" "net"
"net/http" "net/http"
@@ -45,7 +44,7 @@ func NewChecker(trustedIPs []string) (*Checker, error) {
// Contains checks if provided address is in the trusted IPs. // Contains checks if provided address is in the trusted IPs.
func (ip *Checker) Contains(addr string) (bool, error) { func (ip *Checker) Contains(addr string) (bool, error) {
if len(addr) == 0 { if len(addr) == 0 {
return false, errors.New("Contains:noAddress") return false, fmt.Errorf("Contains:noAddress")
} }
ipAddr, err := parseIP(addr) ipAddr, err := parseIP(addr)