This commit is contained in:
Chris Lu
2021-09-14 10:37:06 -07:00
parent 119d5908dd
commit 2789d10342
16 changed files with 46 additions and 47 deletions

View File

@@ -15,11 +15,11 @@ func DetectedHostAddress() string {
return ""
}
if v4Address := selectIpV4(netInterfaces, true); v4Address != ""{
if v4Address := selectIpV4(netInterfaces, true); v4Address != "" {
return v4Address
}
if v6Address := selectIpV4(netInterfaces, false); v6Address != ""{
if v6Address := selectIpV4(netInterfaces, false); v6Address != "" {
return v6Address
}
@@ -59,4 +59,4 @@ func JoinHostPort(host string, port int) string {
return host + ":" + portStr
}
return net.JoinHostPort(host, portStr)
}
}