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

https://github.com/honwen/ip2loc

Get Location of IP
https://github.com/honwen/ip2loc

golang

Last synced: 4 months ago
JSON representation

Get Location of IP

Awesome Lists containing this project

README

        

### Source

- https://github.com/honwen/ip2loc

### Thanks

- https://github.com/metowolf/qqwry.ipdb
- https://github.com/ipipdotnet/ipdb-go

### Usage

```go
package main

import (
"fmt"
"github.com/honwen/ip2loc"
)

func main() {
if loc, err := ip2loc.IP2loc("8.8.8.8"); err != nil {
fmt.Printf("%+v", err)
} else {
fmt.Printf("%+v", loc)
}
}

```