diff --git a/cmd/pulse-host-agent/service_stub.go b/cmd/pulse-host-agent/service_stub.go index 8573a5a..e324496 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 bc1b2a3..f0a2054 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 0aa7373..b3b371a 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)