feat: geo ip.

This commit is contained in:
tx7do
2023-10-19 15:05:49 +08:00
parent 92be8b878a
commit 01bdf5cc06
21 changed files with 343 additions and 38 deletions

16
geoip/qqwry/qqwry_test.go Normal file
View File

@@ -0,0 +1,16 @@
package qqwry
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func TestClient(t *testing.T) {
g := NewClient()
assert.NotNil(t, g)
country, city, isp, err := g.Query("47.108.149.89")
assert.Nil(t, err)
fmt.Println("国家:", country, "城市:", city, "服务商:", isp)
}