From 5e18d677473bc287b56a7d5830190066ad385844 Mon Sep 17 00:00:00 2001 From: ayflying Date: Mon, 31 Mar 2025 18:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ip=E5=BA=93=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aycache/aycache.go | 4 ---- internal/logic/ip2region/ip2region.go | 5 ++--- pkg/aycache/cache.go | 4 ---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/aycache/aycache.go b/aycache/aycache.go index 083aa8a..2f28e19 100644 --- a/aycache/aycache.go +++ b/aycache/aycache.go @@ -9,10 +9,6 @@ type Mod struct { client *gcache.Cache } -//func NewV1(_name ...string) *cache.Mod { -// return pgk.Cache -//} - // Deprecated:弃用,改用 pkg.Cache() func New(_name ...string) gcache.Adapter { diff --git a/internal/logic/ip2region/ip2region.go b/internal/logic/ip2region/ip2region.go index e123336..1b6d2e6 100644 --- a/internal/logic/ip2region/ip2region.go +++ b/internal/logic/ip2region/ip2region.go @@ -34,13 +34,12 @@ func init() { // @receiver s *sIp2region: sIp2region的实例。 func (s *sIp2region) Load() { var err error - //var dbPath = "/mnt/s3/ip2region.xdb" - var dbPath = "lib/ip2region.xdb" + var dbPath = "/runtime/library/ip2region.xdb" if gfile.IsEmpty(dbPath) { //下载文件 putData, err2 := g.Client().Discovery(nil). - Get(ctx, "https://resource.luoe.cn/pgk/ip2region.xdb") + Get(ctx, "https://resource.luoe.cn/attachment/ip2region.xdb") if err2 != nil { return } diff --git a/pkg/aycache/cache.go b/pkg/aycache/cache.go index cd38c81..0ddf424 100644 --- a/pkg/aycache/cache.go +++ b/pkg/aycache/cache.go @@ -10,10 +10,6 @@ type Mod struct { client *gcache.Cache } -//func NewV1(_name ...string) *cache.Mod { -// return pgk.Cache -//} - func New(_name ...string) gcache.Adapter { var cacheAdapterObj gcache.Adapter