mirror of
https://github.com/mpolden/echoip.git
synced 2024-11-10 07:27:22 +01:00
Simplify
This commit is contained in:
parent
215cce290c
commit
148451b883
@ -31,10 +31,7 @@ func (d *empty) IsEmpty() bool { return true }
|
||||
func Empty() Database { return &empty{} }
|
||||
|
||||
func Open(countryDB, cityDB string) (Database, error) {
|
||||
var (
|
||||
country *geoip2.Reader
|
||||
city *geoip2.Reader
|
||||
)
|
||||
var country, city *geoip2.Reader
|
||||
if countryDB != "" {
|
||||
r, err := geoip2.Open(countryDB)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user