error_handling/

directory
v0.0.0-...-1dc4d66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0

README

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.

$ 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.

$ go run ./client/main.go

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

Directories

Path Synopsis
Binary client is an example client.
Binary client is an example client.
Binary server is an example server.
Binary server is an example server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL