From f85cbcdca2161454f012b7067034a760eb123537 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 23 Apr 2024 22:32:49 +0300 Subject: [PATCH] rework Signed-off-by: Vasiliy Tolstov --- requestid.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requestid.go b/requestid.go index 4197f2c..68ed8f7 100644 --- a/requestid.go +++ b/requestid.go @@ -83,7 +83,9 @@ var DefaultMetadataFunc = func(ctx context.Context) (context.Context, error) { type hook struct{} -var Hook = &hook{} +func NewHook() *hook { + return &hook{} +} func (w *hook) ServerSubscriber(next server.FuncSubHandler) server.FuncSubHandler { return func(ctx context.Context, msg server.Message) error {