Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
To run example successfully in my machine (linux), i had:
  * Change $GOPATH instead of $(GOPATH)
  * Add double quote to URL in cURL command
  • Loading branch information
thoainguyen committed Aug 13, 2019
1 parent 77117f3 commit 6bfc474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -35,7 +35,7 @@ service HelloService {
generate rpc code:

```
$ protoc -I=. -I=$(GOPATH)/src --pbgo_out=. hello.proto
$ protoc -I=. -I=$GOPATH/src --pbgo_out=. hello.proto
```

use generate code:
Expand Down Expand Up @@ -163,7 +163,7 @@ service HelloService {
generate rpc/rest code:

```
$ protoc -I=. -I=$(GOPATH)/src --pbgo_out=. hello.proto
$ protoc -I=. -I=$GOPATH/src --pbgo_out=. hello.proto
```

use generate code:
Expand Down Expand Up @@ -223,7 +223,7 @@ func main() {
```
$ curl localhost:8080/hello/gopher
{"value":"hello:gopher"}
$ curl localhost:8080/hello/gopher?value=vgo
$ curl "localhost:8080/hello/gopher?value=vgo"
{"value":"hello:vgo"}
$ curl localhost:8080/hello -X POST --data '{"value":"cgo"}'
{"value":"hello:cgo"}
Expand Down

0 comments on commit 6bfc474

Please sign in to comment.