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
272 B

package qqwry
import (
"testing"
)
func init() {
if err := LoadFile("qqwry.dat"); err != nil {
panic(err)
}
}
func TestQueryIP(t *testing.T) {
queryIp := "1.1.1.1"
country, area, err := QueryIP(queryIp)
if err != nil {
t.Fatal(err)
}
t.Log(country, area)
}