You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
303 B

package qqwry
import (
"testing"
)
func init() {
if err := LoadFile("assets/qqwry.dat"); err != nil {
panic(err)
}
}
func TestQueryIP(t *testing.T) {
queryIp := "1.1.1.1"
city, area, err := QueryIP(queryIp)
if err != nil {
t.Fatal(err)
}
t.Logf("城市:%s,区域:%s", city, area)
}