2023-02-22 16:29:12 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
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"))
|
|
|
|
}
|