File: README.md

package info (click to toggle)
golang-google-grpc 1.64.0-7
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie, trixie-proposed-updates
  • size: 13,272 kB
  • sloc: sh: 1,096; makefile: 72
file content (22 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Description

This example demonstrates basic RPC error handling in gRPC.

# Run the sample code

Run the server, which returns an error if the RPC request's `Name` field is
empty.

```sh
$ go run ./server/main.go
```

Then run the client in another terminal, which does two requests: one with an
empty Name field and one with it populated with the current username provided by
os/user.

```sh
$ go run ./client/main.go
```

It should print the status codes it received from the server.