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
- Host: GitHub
- URL: https://github.com/lafronzt/ipwhois
- Owner: lafronzt
- License: mit
- Created: 2021-11-14T18:20:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-02T21:02:01.000Z (over 4 years ago)
- Last Synced: 2024-11-18T18:24:40.907Z (over 1 year ago)
- Topics: go, go-module, golang, gomodule, ipwhois, ipwhois-go, package, sdk-go
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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