Golang client for iptrace web-service API to determine location of visitors based on their IP.
go get -u github.com/getiptrace/iptrace-go
Get ip info:
package main
import (
iptrace "github.com/getiptrace/iptrace-go"
"fmt"
)
func main() {
iptraceClient, err := iptrace.NewClient("API Key HERE")
if err != nil {
fmt.Println(err)
return
}
response, err := iptraceClient.IPRepo.GetAllDataByIP("IP HERE")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(response)
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.