mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2024-12-21 15:08: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
|
||||
func (record *GeoRecord) LookUp(ip net.IP) error {
|
||||
if err := db.city.Lookup(ip, record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return db.city.Lookup(ip, record)
|
||||
}
|
||||
|
||||
// LookUp an IP and get ASN data
|
||||
func (record *ASNRecord) LookUp(ip net.IP) error {
|
||||
if err := db.asn.Lookup(ip, record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return db.asn.Lookup(ip, record)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user