chore: remove deprecated build tags and use strings.ReplaceAll

- Remove redundant // +build directives (go:build is sufficient in Go 1.17+)
- Replace strings.Replace(..., -1) with strings.ReplaceAll
This commit is contained in:
rcourtman 2025-11-27 10:16:08 +00:00
parent 31927f71e9
commit 1fb4a2c2c6
3 changed files with 1 additions and 3 deletions

View file

@ -1,5 +1,4 @@
//go:build !windows
// +build !windows
package main

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package main

View file

@ -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)