From 22efb95048fac41d28056b1f40fb31e6fe70d0ed Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/GoUtil/GoUtil.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/server/GoUtil/GoUtil.go b/src/server/GoUtil/GoUtil.go index f857f40a..d6d084bd 100644 --- a/src/server/GoUtil/GoUtil.go +++ b/src/server/GoUtil/GoUtil.go @@ -11,7 +11,6 @@ import ( "fmt" "io" "math/rand" - "net/http" "reflect" "strconv" "strings" @@ -429,14 +428,15 @@ func GenerateShuffledAlphabet() string { // 根据IP获取国家名称 func GetCountryByIP(ip string) (string, error) { - resp, err := http.Get("https://ipapi.co/" + ip + "/country_name/") - if err != nil { - return "", err - } - defer resp.Body.Close() - buf := new(bytes.Buffer) - buf.ReadFrom(resp.Body) - return strings.TrimSpace(buf.String()), nil + return "", nil + // resp, err := http.Get("https://ipapi.co/" + ip + "/country_name/") + // if err != nil { + // return "", err + // } + // defer resp.Body.Close() + // buf := new(bytes.Buffer) + // buf.ReadFrom(resp.Body) + // return strings.TrimSpace(buf.String()), nil } // 根据国家名称获取ISO 3166-1国家码