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 {