Remove redundant ifs

This commit is contained in:
Daniel Carrillo 2023-03-10 19:27:10 +01:00
parent 202518d547
commit 04d983d671
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

View File

@ -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
} }