aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8819880..6aa66ca 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,7 @@ import (
"context"
"go.neonxp.dev/jsonrpc2/rpc"
+ "go.neonxp.dev/jsonrpc2/rpc/middleware"
"go.neonxp.dev/jsonrpc2/transport"
)
@@ -90,7 +91,7 @@ func main() {
// Set options after constructor
s.Use(
rpc.WithTransport(&transport.TCP{Bind: ":3000"}), // TCP transport
- rpc.WithMiddleware(rpc.LoggerMiddleware(rpc.StdLogger)), // Logger middleware
+ rpc.WithMiddleware(middleware.Logger(rpc.StdLogger)), // Logger middleware
)
s.Register("multiply", rpc.H(Multiply))