1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-17 04:55:23 +00:00

Fix: v2ctl failed to get geodata loaders (#1014)

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
This commit is contained in:
ght99 2021-05-17 00:44:08 +08:00 committed by GitHub
parent 904b70a8db
commit faee88163c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,9 @@ import (
"fmt" "fmt"
"os" "os"
commlog "github.com/v2fly/v2ray-core/v4/common/log" "github.com/v2fly/v2ray-core/v4/common/log"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
"github.com/v2fly/v2ray-core/v4/infra/control" "github.com/v2fly/v2ray-core/v4/infra/control"
) )
@ -18,7 +20,7 @@ func getCommandName() string {
func main() { func main() {
// let the v2ctl prints log at stderr // let the v2ctl prints log at stderr
commlog.RegisterHandler(commlog.NewLogger(commlog.CreateStderrLogWriter())) log.RegisterHandler(log.NewLogger(log.CreateStderrLogWriter()))
name := getCommandName() name := getCommandName()
cmd := control.GetCommand(name) cmd := control.GetCommand(name)
if cmd == nil { if cmd == nil {