package utils import "os" func GetHostname() string { hostname, err := os.Hostname() if err != nil { hostname = "localhost" } return hostname }