Files
zeekay 94407c2972 Initial commit: Rebranded status page (Gatus fork)
White-labelable status monitoring service with all Gatus branding
removed. Defaults to neutral "Status" text. Branding is driven
entirely by the ui section in config YAML.

- Pure Go build (CGO_ENABLED=0, modernc.org/sqlite)
- Multi-stage Dockerfile (node frontend + go backend + alpine runtime)
- K8s kustomize overlays for hanzo and lux deployments
- GitHub Actions CI for GHCR image push
- Pre-built Vue frontend with zero upstream branding
2026-02-25 19:36:13 -08:00

22 lines
597 B
Go

package key
import "strings"
// ConvertGroupAndNameToKey converts a group and a name to a key
func ConvertGroupAndNameToKey(groupName, name string) string {
return sanitize(groupName) + "_" + sanitize(name)
}
func sanitize(s string) string {
s = strings.TrimSpace(strings.ToLower(s))
s = strings.ReplaceAll(s, "/", "-")
s = strings.ReplaceAll(s, "_", "-")
s = strings.ReplaceAll(s, ".", "-")
s = strings.ReplaceAll(s, ",", "-")
s = strings.ReplaceAll(s, " ", "-")
s = strings.ReplaceAll(s, "#", "-")
s = strings.ReplaceAll(s, "+", "-")
s = strings.ReplaceAll(s, "&", "-")
return s
}