Skip to content

Instantly share code, notes, and snippets.

View seldonsmule's full-sized avatar

Eric Cunningham seldonsmule

View GitHub Profile
@seldonsmule
seldonsmule / getlocalIP.go
Created July 1, 2021 12:25 — forked from ankanch/getlocalIP.go
[Golang] Get Public IP address via Public IP API
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.ipify.org?format=text" // we are using a pulib IP API, we're using ipify here, below are some others
// https://www.ipify.org
// http://myexternalip.com