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

https://github.com/lsongdev/qqwry-go

🌎 A lightweight native Golang implementation of GeoIP API
https://github.com/lsongdev/qqwry-go

Last synced: 8 months ago
JSON representation

🌎 A lightweight native Golang implementation of GeoIP API

Awesome Lists containing this project

README

          

# qqwry

> 🌎 A lightweight native Golang implementation of GeoIP API

## Example

```go
package main

import (
"fmt"

"github.com/song940/qqwry-go/qqwry"
)

func main() {
q, err := qqwry.NewQQwry("qqwry.dat")
if err != nil {
panic(err)
}
result, err := q.Find("1.1.1.1")
if err != nil {
panic(err)
}
fmt.Println(result.IP)
fmt.Println(result.Country, result.City)
}

```

## License

This project is licensed under the MIT license.