// GetLocalhostIP returns the ip address of the localhost domain
localhostIP := os.Getenv(localhostIPEnv)
ip := net.ParseIP(localhostIP)
if ip != nil {
// if localhost is an ip return it
return ip.String()
}
// otherwise, ignore the value and lookup `localhost`
}