This is an unofficial client for the IPWhois.io API.
Install and Use in Command Line:
go install github.com/lafronzt/ipwhois/cmd/ipwhois@latest
ipwhois -ip 1.1.1.1
package main
imports (
"fmt"
"github.com/lafronzt/ipwhois"
)
var c *ipwhois.Client
func init() {
c = ipwhois.NewClient()
}
func main() {
ip := "1.1.1.1"
whois, err := c.GetIPDetails(IP, nil)
if err != nil {
println(err.Error())
return
}
fmt.Printf("%+v\n", whois)
}
ipwhois.NewClientPro("api-key")
- Go >= 1.15