// GetExternalIP checks the external IP of the server
// using the external service
GetExternalIP checks the external IP of the server
using the external service
// GetExternalIP checks the external IP of the server // using the external service
func GetExternalIP() (string, error) {
	res, err := http.Get("http://myexternalip.com/raw")
	if err != nil {
		return "", err
	}
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return "", err
	}
	return strings.TrimSpace(string(body)), nil
}
func GetExternalIP ( ) ( string , error ) { res , err := http . Get ( " " ) if err != nil { return " " , err } defer res . Body . Close ( ) body , err := ioutil . ReadAll ( res . Body ) if err != nil { return " " , err } return strings . TrimSpace ( string ( body ) ) , nil }
GetExternalIP checks the external IP of the server
using the external service
GetExternalIP checks the external IP of the server using the external service