Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

style: fix revive linter warnings

rcourtmanfdb2f86d9012
diff --git a/cmd/pulse-host-agent/service_stub.go b/cmd/pulse-host-agent/service_stub.go
index e324496a01..19118f7f8c 100644
--- a/cmd/pulse-host-agent/service_stub.go
+++ b/cmd/pulse-host-agent/service_stub.go
@@ -8,6 +8,6 @@ import (
)
// runAsWindowsService is a no-op on non-Windows platforms
-func runAsWindowsService(cfg hostagent.Config, logger zerolog.Logger) error {
+func runAsWindowsService(_ hostagent.Config, _ zerolog.Logger) error {
return nil
}
diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.go
index f7a6fc78a4..6fe9f8ebfd 100644
--- a/internal/alerts/alerts.go
+++ b/internal/alerts/alerts.go
@@ -7582,8 +7582,8 @@ func cloneStringPtr(value *string) *string {
if value == nil {
return nil
}
- copy := *value
- return &copy
+ v := *value
+ return &v
}
func cloneThresholdConfig(cfg ThresholdConfig) ThresholdConfig {
@@ -7972,14 +7972,14 @@ func (m *Manager) evaluateFilterStack(guest interface{}, stack FilterStack) bool
}
}
return true
- } else { // OR
- for _, result := range results {
- if result {
- return true
- }
+ }
+ // OR
+ for _, result := range results {
+ if result {
+ return true
}
- return false
}
+ return false
}
// getGuestThresholds returns the appropriate thresholds for a guest
diff --git a/internal/api/auth.go b/internal/api/auth.go
index a9723c8feb..aef1ee46c8 100644
--- a/internal/api/auth.go
+++ b/internal/api/auth.go
@@ -290,13 +290,12 @@ func CheckAuth(cfg *config.Config, w http.ResponseWriter, r *http.Request) bool
// Use ValidateAndExtendSession for sliding expiration
if ValidateAndExtendSession(cookie.Value) {
return true
- } else {
- // Debug logging for failed session validation
- log.Debug().
- Str("session_token", cookie.Value[:8]+"...").
- Str("path", r.URL.Path).
- Msg("Session validation failed - token not found or expired")
}
+ // Debug logging for failed session validation
+ log.Debug().
+ Str("session_token", cookie.Value[:8]+"...").
+ Str("path", r.URL.Path).
+ Msg("Session validation failed - token not found or expired")
} else if err != nil {
// Debug logging when no session cookie found
log.Debug().