mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2024-12-22 07:28:00 +00:00
Remove redundant ifs
This commit is contained in:
parent
202518d547
commit
04d983d671
@ -68,18 +68,10 @@ func CloseDBs() {
|
|||||||
|
|
||||||
// LookUp an IP and get city data
|
// LookUp an IP and get city data
|
||||||
func (record *GeoRecord) LookUp(ip net.IP) error {
|
func (record *GeoRecord) LookUp(ip net.IP) error {
|
||||||
if err := db.city.Lookup(ip, record); err != nil {
|
return db.city.Lookup(ip, record)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LookUp an IP and get ASN data
|
// LookUp an IP and get ASN data
|
||||||
func (record *ASNRecord) LookUp(ip net.IP) error {
|
func (record *ASNRecord) LookUp(ip net.IP) error {
|
||||||
if err := db.asn.Lookup(ip, record); err != nil {
|
return db.asn.Lookup(ip, record)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user