Replace ErrNotFound constant with errors.New for consistent error handling
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package mmdb
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/netip"
|
||||
|
||||
"git.kor-elf.net/kor-elf-shield/geoip2"
|
||||
@@ -47,7 +46,7 @@ func (c *City) infoCity(ip netip.Addr, reader *oschwaldGeoip2.Reader) (geoip2.In
|
||||
return geoip2.Info{}, err
|
||||
}
|
||||
if !record.HasData() {
|
||||
return geoip2.Info{}, errors.New(geoip2.ErrNotFound)
|
||||
return geoip2.Info{}, geoip2.ErrNotFound
|
||||
}
|
||||
|
||||
var timeZone string
|
||||
|
||||
Reference in New Issue
Block a user