Add staticheck to CI (#152)

* Add staticheck to CI

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix staticcheck warnings

Signed-off-by: Xe Iaso <me@xeiaso.net>

* oh, right, playwright is broken

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-03-29 15:00:22 -04:00 committed by GitHub
parent 6b2ae30bae
commit 52ca5390c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 35 deletions

View file

@ -26,7 +26,7 @@ func UnchangingCache(next http.Handler) http.Handler {
// RemoteXRealIP sets the X-Real-Ip header to the request's real IP if
// the setting is enabled by the user.
func RemoteXRealIP(useRemoteAddress bool, bindNetwork string, next http.Handler) http.Handler {
if useRemoteAddress == false {
if !useRemoteAddress {
slog.Debug("skipping middleware, useRemoteAddress is empty")
return next
}