Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wanzo-code authored Apr 9, 2022
1 parent 2ab3c1f commit f867d20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Currently only supports `Go 1.18` and above
# Install



---
- install `protoc` at first :http://github.com/google/protobuf/releases

- install `protoc-gen-go` and `protoc-gen-tinyrpc`:
Expand Down Expand Up @@ -91,6 +89,7 @@ func (this *ArithService) Div(args *ArithRequest, reply *ArithResponse) error {
}
```
We can define our services.

#Server

Then open a tinyrpc server, the code is as follows:
Expand Down Expand Up @@ -150,4 +149,4 @@ client := tinyrpc.NewClientWithCompress(conn, compressor.Snappy)
resq := pb.ArithRequest{A: 4, B: 15}
resp := pb.ArithResponse{}
err = client.Call("ArithService.Mul", &resq, &resp)
```
```

0 comments on commit f867d20

Please sign in to comment.