chore: lint fixes

This commit is contained in:
Shirshendu Bhowmick 2026-03-28 01:08:09 +05:30
parent cc7b198789
commit d27dab6e8f
No known key found for this signature in database
2 changed files with 1 additions and 9 deletions

View File

@ -3131,7 +3131,7 @@ func TestRemoteIPFail(t *testing.T) {
c.Request.RemoteAddr = "[:::]:80"
ip, err := netip.ParseAddr(c.RemoteIP())
trust := c.engine.isTrustedProxy(ip)
assert.NotNil(t, err)
require.Error(t, err)
assert.False(t, trust)
}

View File

@ -970,14 +970,6 @@ func TestPrepareTrustedCIRDsWith(t *testing.T) {
}
}
func parseCIDR(cidr string) netip.Prefix {
prefix, err := netip.ParsePrefix(cidr)
if err != nil {
fmt.Println(err)
}
return prefix.Masked()
}
func assertRoutePresent(t *testing.T, gotRoutes RoutesInfo, wantRoute RouteInfo) {
for _, gotRoute := range gotRoutes {
if gotRoute.Path == wantRoute.Path && gotRoute.Method == wantRoute.Method {