return string(ip) instead of empty string on error

This commit is contained in:
Vishal Sharma 2022-02-25 17:11:45 +05:30 committed by GitHub
parent 56c9ea5430
commit ab72e92fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ func getOutboundIP() string {
resp, err := http.Get("https://api.ipify.org?format=text")
if err != nil {
return ""
return string(ip)
}
defer resp.Body.Close()