Skip to content

Commit a2ca46c

Browse files
authored
examples: organize READMEs better (grpc#6121)
1 parent 4efec30 commit a2ca46c

File tree

2 files changed

+36
-26
lines changed

2 files changed

+36
-26
lines changed

examples/README.md

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
# gRPC Hello World
1+
# Examples
22

3-
Follow these setup to run the [quick start][] example:
3+
The following examples are provided to help users get started with gRPC-Go.
4+
They are arranged as follows:
45

5-
1. Get the code:
6+
* `helloworld` - a simple example showing a basic client and server
7+
* `routeguide` - a more complicated example showing different types of streaming RPCs
8+
* `features` - a collection of examples, each focused on a single gRPC feature
69

7-
```console
8-
$ go get google.golang.org/grpc/examples/helloworld/greeter_client
9-
$ go get google.golang.org/grpc/examples/helloworld/greeter_server
10-
```
11-
12-
2. Run the server:
13-
14-
```console
15-
$ $(go env GOPATH)/bin/greeter_server &
16-
```
17-
18-
3. Run the client:
19-
20-
```console
21-
$ $(go env GOPATH)/bin/greeter_client
22-
Greeting: Hello world
23-
```
24-
25-
For more details (including instructions for making a small change to the
26-
example code) or if you're having trouble running this example, see [Quick
27-
Start][].
28-
29-
[quick start]: https://grpc.io/docs/languages/go/quickstart
10+
`data` is a directory containing data used by the examples, e.g. TLS certificates.

examples/helloworld/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# gRPC Hello World
2+
3+
Follow these setup to run the [quick start][] example:
4+
5+
1. Get the code:
6+
7+
```console
8+
$ go get google.golang.org/grpc/examples/helloworld/greeter_client
9+
$ go get google.golang.org/grpc/examples/helloworld/greeter_server
10+
```
11+
12+
2. Run the server:
13+
14+
```console
15+
$ $(go env GOPATH)/bin/greeter_server &
16+
```
17+
18+
3. Run the client:
19+
20+
```console
21+
$ $(go env GOPATH)/bin/greeter_client
22+
Greeting: Hello world
23+
```
24+
25+
For more details (including instructions for making a small change to the
26+
example code) or if you're having trouble running this example, see [Quick
27+
Start][].
28+
29+
[quick start]: https://grpc.io/docs/languages/go/quickstart

0 commit comments

Comments
 (0)