diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-05-28 16:53:20 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-05-28 16:53:20 +0300 |
commit | f304a07a8cfe67b2a65f95f27eb10a9b854c4ef8 (patch) | |
tree | 9e6a7e9ea6b8d600cccac5a5d50f3232d631d073 /README.md | |
parent | 281eda83c9f4bcb06318444df3574df0840205fa (diff) |
Improved middlewares
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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)) |