pingtunnel/country_test.go

17 lines
349 B
Go
Raw Normal View History

2023-03-18 08:32:35 +03:00
package pingtunnel
2023-02-22 16:29:12 +03:00
import (
"fmt"
"testing"
)
func TestNew(t *testing.T) {
2023-02-22 16:30:11 +03:00
LoadGeoDB("./GeoLite2-Country.mmdb")
2023-02-22 16:29:12 +03:00
fmt.Println(GetCountryIsoCode("39.106.101.133"))
fmt.Println(GetCountryIsoCode(""))
fmt.Println(GetCountryIsoCode("aa"))
fmt.Println(GetCountryIsoCode("39.106.101.133:14234"))
fmt.Println(GetCountryIsoCode("192.168.1.121"))
}