mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 20:52:15 +08:00
fix: MaxMind MMDB code character case
This commit is contained in:
parent
90d0ef033b
commit
7754b46dc4
@ -3,6 +3,7 @@ package mmdb
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/oschwald/maxminddb-golang"
|
"github.com/oschwald/maxminddb-golang"
|
||||||
)
|
)
|
||||||
@ -26,7 +27,7 @@ func (r Reader) LookupCode(ipAddress net.IP) []string {
|
|||||||
if country.Country.IsoCode == "" {
|
if country.Country.IsoCode == "" {
|
||||||
return []string{}
|
return []string{}
|
||||||
}
|
}
|
||||||
return []string{country.Country.IsoCode}
|
return []string{strings.ToLower(country.Country.IsoCode)}
|
||||||
|
|
||||||
case typeSing:
|
case typeSing:
|
||||||
var code string
|
var code string
|
||||||
|
Loading…
Reference in New Issue
Block a user