Skip to content

Simplify syntax in example code #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/guides/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protocol buffer messages:
// The greeter service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -92,9 +92,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -204,9 +204,9 @@ same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -115,9 +115,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -123,9 +123,9 @@ same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -125,9 +125,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -83,9 +83,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ method that takes a `HelloRequest` parameter from the client and returns a
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -80,9 +80,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/objective-c.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ RPC method that takes a `HelloRequest` parameter from the client and returns a
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -151,9 +151,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ the server, and that this method is defined like this:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -333,9 +333,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ method that takes a `HelloRequest` parameter from the client and returns a
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -137,9 +137,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/quickstart/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ method that takes a `HelloRequest` parameter from the client and returns a
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand All @@ -102,9 +102,9 @@ method, with the same request and response types:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHello (HelloRequest) returns (HelloReply);
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
rpc SayHelloAgain (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
Expand Down
8 changes: 4 additions & 4 deletions content/docs/tutorials/basic/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Then we define `rpc` methods inside our service definition, specifying their req

```proto
// Obtains the feature at a given position.
rpc GetFeature(Point) returns (Feature) {}
rpc GetFeature(Point) returns (Feature);
```

- A *server-side streaming RPC* where the client sends a request to the server
Expand All @@ -81,7 +81,7 @@ Then we define `rpc` methods inside our service definition, specifying their req
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
rpc ListFeatures(Rectangle) returns (stream Feature) {}
rpc ListFeatures(Rectangle) returns (stream Feature);
```

- A *client-side streaming RPC* where the client writes a sequence of messages
Expand All @@ -93,7 +93,7 @@ Then we define `rpc` methods inside our service definition, specifying their req
```proto
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
rpc RecordRoute(stream Point) returns (RouteSummary) {}
rpc RecordRoute(stream Point) returns (RouteSummary);
```

- A *bidirectional streaming RPC* where both sides send a sequence of messages
Expand All @@ -108,7 +108,7 @@ Then we define `rpc` methods inside our service definition, specifying their req
```proto
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
rpc RouteChat(stream RouteNote) returns (stream RouteNote);
```

Our `.proto` file also contains protocol buffer message type definitions for all
Expand Down
8 changes: 4 additions & 4 deletions content/docs/tutorials/basic/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ all of which are used in the `RouteGuide` service:

```protobuf
// Obtains the feature at a given position.
rpc GetFeature(Point) returns (Feature) {}
rpc GetFeature(Point) returns (Feature);
```

- A *server-side streaming RPC* where the client sends a request to the server
Expand All @@ -99,7 +99,7 @@ all of which are used in the `RouteGuide` service:
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
rpc ListFeatures(Rectangle) returns (stream Feature) {}
rpc ListFeatures(Rectangle) returns (stream Feature);
```

- A *client-side streaming RPC* where the client writes a sequence of messages
Expand All @@ -111,7 +111,7 @@ all of which are used in the `RouteGuide` service:
```protobuf
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
rpc RecordRoute(stream Point) returns (RouteSummary) {}
rpc RecordRoute(stream Point) returns (RouteSummary);
```

- A *bidirectional streaming RPC* where both sides send a sequence of messages
Expand All @@ -126,7 +126,7 @@ all of which are used in the `RouteGuide` service:
```protobuf
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
rpc RouteChat(stream RouteNote) returns (stream RouteNote);
```

Our `.proto` file also contains protocol buffer message type definitions for all
Expand Down
8 changes: 4 additions & 4 deletions content/docs/tutorials/basic/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ all of which are used in the `RouteGuide` service:

```protobuf
// Obtains the feature at a given position.
rpc GetFeature(Point) returns (Feature) {}
rpc GetFeature(Point) returns (Feature);
```

- A *server-side streaming RPC* where the client sends a request to the server
Expand All @@ -93,7 +93,7 @@ all of which are used in the `RouteGuide` service:
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
rpc ListFeatures(Rectangle) returns (stream Feature) {}
rpc ListFeatures(Rectangle) returns (stream Feature);
```

- A *client-side streaming RPC* where the client writes a sequence of messages
Expand All @@ -105,7 +105,7 @@ all of which are used in the `RouteGuide` service:
```protobuf
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
rpc RecordRoute(stream Point) returns (RouteSummary) {}
rpc RecordRoute(stream Point) returns (RouteSummary);
```

- A *bidirectional streaming RPC* where both sides send a sequence of messages
Expand All @@ -120,7 +120,7 @@ all of which are used in the `RouteGuide` service:
```protobuf
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
rpc RouteChat(stream RouteNote) returns (stream RouteNote);
```

Our `.proto` file also contains protocol buffer message type definitions for all
Expand Down
8 changes: 4 additions & 4 deletions content/docs/tutorials/basic/dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ all of which are used in the `RouteGuide` service:

```proto
// Obtains the feature at a given position.
rpc GetFeature(Point) returns (Feature) {}
rpc GetFeature(Point) returns (Feature);
```

- A *server-side streaming RPC* where the client sends a request to the server
Expand All @@ -93,7 +93,7 @@ all of which are used in the `RouteGuide` service:
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
rpc ListFeatures(Rectangle) returns (stream Feature) {}
rpc ListFeatures(Rectangle) returns (stream Feature);
```

- A *client-side streaming RPC* where the client writes a sequence of messages
Expand All @@ -105,7 +105,7 @@ all of which are used in the `RouteGuide` service:
```proto
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
rpc RecordRoute(stream Point) returns (RouteSummary) {}
rpc RecordRoute(stream Point) returns (RouteSummary);
```

- A *bidirectional streaming RPC* where both sides send a sequence of messages
Expand All @@ -120,7 +120,7 @@ all of which are used in the `RouteGuide` service:
```proto
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
rpc RouteChat(stream RouteNote) returns (stream RouteNote);
```

Our `.proto` file also contains protocol buffer message type definitions for all
Expand Down
Loading