From 13f05c1b9d9771e8884cfbc23185aba1e7415576 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 6 Sep 2021 13:42:05 +0100 Subject: [PATCH] added service registration --- app/restful-api/config.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/restful-api/config.go diff --git a/app/restful-api/config.go b/app/restful-api/config.go new file mode 100644 index 000000000..f5ddf6cae --- /dev/null +++ b/app/restful-api/config.go @@ -0,0 +1,12 @@ +package restful_api + +import ( + "context" + "github.com/v2fly/v2ray-core/v4/common" +) + +func init() { + common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) { + return newRestfulService(ctx, config.(*Config)) + })) +}