Broken linting

This commit is contained in:
Hein 2025-12-08 17:12:44 +02:00
parent bf955b7971
commit 97b39de88a
3 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,7 @@
// Package middleware provides HTTP middleware functionalities such as rate limiting and IP blacklisting.
package middleware package middleware
//nolint:all
import ( import (
"encoding/json" "encoding/json"
"net/http" "net/http"

View File

@ -88,11 +88,11 @@ func TestRateLimiterDifferentIPs(t *testing.T) {
func TestGetClientIP(t *testing.T) { func TestGetClientIP(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
remoteAddr string remoteAddr string
xForwardedFor string xForwardedFor string
xRealIP string xRealIP string
expectedIP string expectedIP string
}{ }{
{ {
name: "RemoteAddr only", name: "RemoteAddr only",

View File

@ -85,8 +85,8 @@ func TestSanitizeMap(t *testing.T) {
sanitizer := DefaultSanitizer() sanitizer := DefaultSanitizer()
input := map[string]interface{}{ input := map[string]interface{}{
"name": "<script>alert(1)</script>John", "name": "<script>alert(1)</script>John",
"email": "test@example.com", "email": "test@example.com",
"nested": map[string]interface{}{ "nested": map[string]interface{}{
"bio": "<iframe src='evil.com'>Bio</iframe>", "bio": "<iframe src='evil.com'>Bio</iframe>",
}, },