An open API service indexing awesome lists of open source software.

https://github.com/lafronzt/ipwhois

A Go client for the IPWhois.io API
https://github.com/lafronzt/ipwhois

go go-module golang gomodule ipwhois ipwhois-go package sdk-go

Last synced: 5 months ago
JSON representation

A Go client for the IPWhois.io API

Awesome Lists containing this project

README

          

# IP Whois Go Client

**This is an unofficial client for the [IPWhois.io API](https://ipwhois.io/).**

## Quick Start

Install and Use in Command Line:

```bash
go install github.com/lafronzt/ipwhois/cmd/ipwhois@latest

ipwhois -ip 1.1.1.1
```

## Us as a Go Package

```go
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)
}
```

## To Use with the Pro Version of IPWhois.io use the following

```go
ipwhois.NewClientPro("api-key")
```

## Requirements

- Go >= 1.15