This package is designed to fetch your external IP address from the internet.
package main
import (
"fmt"
"github.com/kejunmao/ipgetter"
)
func main() {
fmt.Println(ipgetter.Myip())
}
$ go install github.com/kejunmao/ipgetter/...
$ ipgetter
8.8.8.8