世界 3 rokov pred
rodič
commit
dcd7ca78fc
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 1 1
      constant/path.go
  2. 2 2
      route/router.go

+ 1 - 1
constant/path.go

@@ -11,7 +11,7 @@ const dirName = "sing-box"
 
 var resourcePaths []string
 
-func Find(name string) (string, bool) {
+func FindPath(name string) (string, bool) {
 	name = os.ExpandEnv(name)
 	if rw.FileExists(name) {
 		return name, true

+ 2 - 2
route/router.go

@@ -307,7 +307,7 @@ func (r *Router) prepareGeoIPDatabase() error {
 		geoPath = r.geoIPOptions.Path
 	} else {
 		geoPath = "geoip.db"
-		if foundPath, loaded := C.Find(geoPath); loaded {
+		if foundPath, loaded := C.FindPath(geoPath); loaded {
 			geoPath = foundPath
 		}
 	}
@@ -342,7 +342,7 @@ func (r *Router) prepareGeositeDatabase() error {
 		geoPath = r.geoIPOptions.Path
 	} else {
 		geoPath = "geosite.db"
-		if foundPath, loaded := C.Find(geoPath); loaded {
+		if foundPath, loaded := C.FindPath(geoPath); loaded {
 			geoPath = foundPath
 		}
 	}