Skip to content

gkodali-zededa/ipinfo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ipinfo

A wrapper for http://ipinfo.io written in Go language

package main

import (
	"log"
	"net"

	"github.com/RevH/ipinfo"
)

func main() {
	myIP, err := ipinfo.MyIP()
	if err != nil {
		log.Fatalln(err)
	}
	log.Println(myIP)

	foreignIP, err := ipinfo.ForeignIP("8.8.8.8")
	if err != nil {
		log.Fatalln(err)
	}
	log.Println(foreignIP)
}

About

A wrapper for http://ipinfo.io in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%