Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neonxp authored May 21, 2022
1 parent 81389df commit c5a9af1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ Go 1.18+ required
```

Handler must have exact two arguments (context and input of any json serializable type) and exact two return values (output of any json serializable type and error)
3. Wrap handler with `rpc.Wrap` method and register it in server:

4. Wrap handler with `rpc.H` method and register it in server:
```go
s.Register("multiply", rpc.H(Multiply))
```

4. Run RPC server:
5. Run RPC server:
```go
s.Run(ctx)
```
Expand Down

0 comments on commit c5a9af1

Please sign in to comment.