func getIpify() string {
	c := http.Client{Timeout: defaultHTTPTImeout}
	resp, err := c.Get(IpifyURL)
	if err != nil {
		return ""
	}
	defer resp.Body.Close()
	ip, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return ""
	}
	if resp.StatusCode != http.StatusOK {
		return ""
	}
	return string(ip)
}
getIpify returns external IP address as from ipify.org
package main
import (
	"io/ioutil"
	"net/http"
	"time"
)
const defaultHTTPTImeout = 4000 * time.Millisecond
const IpifyURL = "https://api.ipify.org?format=text"
const clientExternal = "external"