From 4d3c57dd39aaf732ac527afdc9d2380defbad908 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 4 Sep 2021 20:05:17 +0100 Subject: [PATCH] register implementation automatically --- common/type.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/type.go b/common/type.go index 1f85b4ef1..943ffabff 100644 --- a/common/type.go +++ b/common/type.go @@ -2,6 +2,7 @@ package common import ( "context" + "github.com/v2fly/v2ray-core/v4/common/registry" "reflect" ) @@ -17,6 +18,8 @@ func RegisterConfig(config interface{}, configCreator ConfigCreator) error { return newError(configType.Name() + " is already registered").AtError() } typeCreatorRegistry[configType] = configCreator + + registry.RegisterImplementation(config, nil) return nil }