From 9b3282018472488c2448f6ca63b607aeb2355ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sun, 22 Dec 2024 12:38:14 -0800 Subject: [PATCH] geoip: homebrew default path --- geoipapi.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/geoipapi.go b/geoipapi.go index c81eaf2..ec181e3 100644 --- a/geoipapi.go +++ b/geoipapi.go @@ -153,15 +153,16 @@ func open(t geoType) (*geoip2.Reader, error) { rdr, err := geoip2.Open(fileName) return rdr, err - } func findDB() string { dirs := []string{ - "/usr/share/GeoIP/", // Linux default - "/usr/share/local/GeoIP/", // source install? - "/usr/local/share/GeoIP/", // FreeBSD - "/opt/local/share/GeoIP/", // MacPorts + "/usr/share/GeoIP/", // Linux default + "/usr/share/local/GeoIP/", // source install? + "/usr/local/share/GeoIP/", // FreeBSD + "/opt/local/share/GeoIP/", // MacPorts + "/opt/homebrew/var/GeoIP/", // Homebrew + } for _, dir := range dirs { if _, err := os.Stat(dir); err != nil {