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.

chore: remove deprecated build tags and use strings.ReplaceAll

rcourtmanbd2635cabe4a
diff --git a/cmd/pulse-host-agent/service_stub.go b/cmd/pulse-host-agent/service_stub.go
index 8573a5ac23..e324496a01 100644
--- a/cmd/pulse-host-agent/service_stub.go
+++ b/cmd/pulse-host-agent/service_stub.go
@@ -1,5 +1,4 @@
//go:build !windows
-// +build !windows
package main
diff --git a/cmd/pulse-host-agent/service_windows.go b/cmd/pulse-host-agent/service_windows.go
index bc1b2a3c44..f0a20545ef 100644
--- a/cmd/pulse-host-agent/service_windows.go
+++ b/cmd/pulse-host-agent/service_windows.go
@@ -1,5 +1,4 @@
//go:build windows
-// +build windows
package main
diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go
index 0aa737366c..b3b371ab3d 100644
--- a/internal/api/config_handlers.go
+++ b/internal/api/config_handlers.go
@@ -6007,7 +6007,7 @@ func (h *ConfigHandlers) handleSecureAutoRegister(w http.ResponseWriter, _ *http
// Generate a unique token name based on Pulse's IP/hostname
hostname, _ := os.Hostname()
if hostname == "" {
- hostname = strings.Replace(clientIP, ".", "-", -1)
+ hostname = strings.ReplaceAll(clientIP, ".", "-")
}
timestamp := time.Now().Unix()
tokenName := fmt.Sprintf("pulse-%s-%d", hostname, timestamp)