@@ -153,7 +153,7 @@ func (g *GeoIP2) GetASN(ip net.IP) (string, int, error) {
return "", 0, err
}
- c, err := r.ISP(ip)
+ c, err := r.ASN(ip)
if err != nil {
return "", 0, fmt.Errorf("lookup ASN for '%s': %s", ip.String(), err)
@@ -98,7 +98,7 @@ func TestGetTargets(t *testing.T) {
tests = append(tests,
test{"@ continent regiongroup country region asn ip",
[]string{"[207.171.1.1]", "[207.171.1.0]", "as7012", "us-ca", "us-west", "us", "north-america", "@"},
- "",
+ "207.171.1.1",
})