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:
mathieuHa
2024-05-18 13:20:14 +02:00
committed by GitHub
co-authored by Max Lerebourg
parent 70ad0365f0
commit 6187a722ca
13 changed files with 76 additions and 100 deletions
+2 -1
View File
@@ -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)