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.
19 lines
306 B
19 lines
306 B
package main
|
|
|
|
import (
|
|
"IPRegion/global"
|
|
"IPRegion/ip2region"
|
|
"encoding/json"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestIpInfo(tt *testing.T) {
|
|
address := "114.114.114.114"
|
|
var ipInfo ip2region.IpInfo
|
|
ipInfo, _ = GetIPInfo(address, global.SearchType)
|
|
res, _ := json.Marshal(ipInfo)
|
|
fmt.Println(string(res))
|
|
|
|
}
|