diff options
Diffstat (limited to 'rpc/wrapper.go')
-rw-r--r-- | rpc/wrapper.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/wrapper.go b/rpc/wrapper.go index 1d6361c..8aa9556 100644 --- a/rpc/wrapper.go +++ b/rpc/wrapper.go @@ -24,7 +24,7 @@ import ( "encoding/json" ) -func H[RQ any, RS any](handler func(context.Context, *RQ) (RS, error)) Handler { +func H[RQ any, RS any](handler func(context.Context, *RQ) (RS, error)) HandlerFunc { return func(ctx context.Context, in json.RawMessage) (json.RawMessage, error) { req := new(RQ) if err := json.Unmarshal(in, req); err != nil { @@ -41,4 +41,4 @@ func H[RQ any, RS any](handler func(context.Context, *RQ) (RS, error)) Handler { } } -type Handler func(context.Context, json.RawMessage) (json.RawMessage, error) +type HandlerFunc func(context.Context, json.RawMessage) (json.RawMessage, error) |