修复ip库无法显示的问题

This commit is contained in:
ayflying
2025-08-07 11:17:04 +08:00
parent 999f1f6a84
commit 0fded8b634

View File

@@ -1,13 +1,14 @@
package ip2region
import (
"net"
"strings"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gfile"
"github.com/lionsoul2014/ip2region/binding/golang/xdb"
"net"
"strings"
)
var (
@@ -81,7 +82,7 @@ func (s *sIp2region) Load() {
func (s *sIp2region) GetIp(ip string) (res []string) {
//初始化加载
if s.searcher != nil {
if s.searcher == nil {
s.Load()
}