-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I'm getting the following error with some IP addresses:
190.4.67.219 runtime error: index out of range
/opt/_/src/ip/ip2country.go:32 (0x535a1e)
func.001: debug.PrintStack()
/usr/local/go/src/pkg/runtime/panic.c:229 (0x413581)
/usr/local/go/src/pkg/runtime/panic.c:487 (0x413d23)
/usr/local/go/src/pkg/runtime/panic.c:442 (0x413b55)
/opt/gopkg/src/github.com/nranchev/go-libGeoIP/libgeo.go:223 (0x5a1be1)
com/nranchev/go-libGeoIP.(_GeoIP).GetLocationByIPNum: location.CountryCode = countryCode[offset-countryBegin]
/opt/gopkg/src/github.com/nranchev/go-libGeoIP/libgeo.go:204 (0x5a1a85)
com/nranchev/go-libGeoIP.(GeoIP).GetLocationByIP: return gi.GetLocationByIPNum(AddrToNum(ip))
/opt/_/src/ip/ip2country.go:37 (0x5354a3)
Ip2country: loc := gi.GetLocationByIP(ip.String())
/opt/__/src/***/program.go:171 (0x4617ec)
saveCert: ipcountry := ip.Ip2country(conn.RemoteAddr().(net.TCPAddr).IP)
/opt/******/src/**_****/program.go:142 (0x461622)
queue: doSomething(next)
/usr/local/go/src/pkg/runtime/proc.c:1223 (0x4170e0)