19 lines
329 B
Go
19 lines
329 B
Go
package tools
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
)
|
|
|
|
func TestGetOutboundIP(t *testing.T) {
|
|
ip, err := GetOutboundIP()
|
|
log.Println(ip, err)
|
|
}
|
|
func TestParseIpNew(t *testing.T) {
|
|
p, _ := NewIpdb("../config/qqzeng-ip-utf8.dat")
|
|
ipstr := p.Get("211.23.27.192")
|
|
log.Println(ipstr)
|
|
ipstr = p.Get("119.178.52.245")
|
|
log.Println(ipstr)
|
|
}
|