mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
167 feature update to go 122 (#168)
* ⬆️ Upgrade golang version * 🚨 Optimize Lint for strings * 🔒️ Add allow list of packages * 🚨 Fix final lint * 👷 Update ci * 🍱 upgrade dependencies * 🍱 fix comment --------- Co-authored-by: Max Lerebourg <maxlerebourg@gmail.com>
This commit is contained in:
co-authored by
Max Lerebourg
parent
70ad0365f0
commit
6187a722ca
+2
-1
@@ -3,6 +3,7 @@
|
||||
package ip
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -45,7 +46,7 @@ func NewChecker(log *logger.Log, trustedIPs []string) (*Checker, error) {
|
||||
// Contains checks if provided address is in the trusted IPs.
|
||||
func (ip *Checker) Contains(addr string) (bool, error) {
|
||||
if len(addr) == 0 {
|
||||
return false, fmt.Errorf("Contains:noAddress")
|
||||
return false, errors.New("Contains:noAddress")
|
||||
}
|
||||
|
||||
ipAddr, err := parseIP(addr)
|
||||
|
||||
Reference in New Issue
Block a user