fix: resolve all golangci-lint errors
Some checks failed
CI/CD / Test (push) Successful in 29s
CI/CD / Lint (push) Successful in 39s
CI/CD / Generate SBOM (push) Successful in 16s
CI/CD / Build (darwin-amd64) (push) Successful in 21s
CI/CD / Build (linux-amd64) (push) Successful in 20s
CI/CD / Build (darwin-arm64) (push) Successful in 21s
CI/CD / Build (linux-arm64) (push) Successful in 21s
CI/CD / Build & Push Docker Image (push) Failing after 4s
CI/CD / Release (push) Has been skipped

- Add error checks for w.Write, json.Encode, os.MkdirAll, os.WriteFile, file.Seek
- Fix gosimple S1000: use for range instead of for { select {} }
- Fix ineffectual assignments in adaptive_io.go
- Add nolint directives for unused code intended for future use
- Fix SA1029: use custom contextKey type instead of string
- Fix SA9003: remove empty branch in client_network_handler.go
- All linting checks now pass
This commit is contained in:
2025-12-11 21:17:37 +01:00
parent 64a5daa790
commit 7b9a0e4041
12 changed files with 368 additions and 344 deletions

View File

@@ -96,10 +96,9 @@ func (cct *ClientConnectionTracker) DetectClientConnectionType(r *http.Request)
}
// Check for specific network indicators in headers
if xForwardedFor := r.Header.Get("X-Forwarded-For"); xForwardedFor != "" {
// This might indicate the client is behind a mobile carrier NAT
// Additional logic could be added here
}
// X-Forwarded-For might indicate client is behind a mobile carrier NAT
// This is noted for future enhancement
_ = r.Header.Get("X-Forwarded-For")
// Check connection patterns (this would need more sophisticated logic)
clientIP := getClientIP(r)