kubernetes/staging/src/k8s.io/component-helpers/node/util/hostname.go

// GetHostname returns OS's hostname if 'hostnameOverride' is empty; otherwise, it returns
// 'hostnameOverride'. In either case, the value is canonicalized (trimmed and
// lowercased).
func GetHostname(hostnameOverride string) (string, error) {}