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
- Host: GitHub
- URL: https://github.com/lsongdev/qqwry-go
- Owner: lsongdev
- License: mit
- Created: 2022-11-25T11:52:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T08:49:17.000Z (about 3 years ago)
- Last Synced: 2025-02-13T22:23:47.145Z (about 1 year ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/song940/qqwry-go
- Size: 5.04 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.