From ee8d2ebfa9a50d1ea1f22a48a04995e00abce3fc Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sun, 19 Nov 2017 21:44:49 +0100 Subject: [PATCH] remove json parser from core --- main/config_json.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main/config_json.go b/main/config_json.go index d348810b..6a826d7a 100644 --- a/main/config_json.go +++ b/main/config_json.go @@ -6,9 +6,7 @@ import ( "os/exec" "v2ray.com/core" - "v2ray.com/core/app/log" "v2ray.com/core/common/platform" - jsonconf "v2ray.com/ext/tools/conf/serial" ) func jsonToProto(input io.Reader) (*core.Config, error) { @@ -42,8 +40,7 @@ func init() { core.RegisterConfigLoader(core.ConfigFormat_JSON, func(input io.Reader) (*core.Config, error) { config, err := jsonToProto(input) if err != nil { - log.Trace(newError("failed to execute v2ctl to convert config file.").Base(err).AtWarning()) - return jsonconf.LoadJSONConfig(input) + return nil, newError("failed to execute v2ctl to convert config file.").Base(err) } return config, nil })