Skip to content

Commit

Permalink
README.md: document how to build a specific version of protoc-gen-go
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlin committed Nov 28, 2018
1 parent 8d0c54c commit 593363e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ To use this software, you must:
https://golang.org/doc/install
for details or, if you are using gccgo, follow the instructions at
https://golang.org/doc/install/gccgo
- Grab the code from the repository and install the proto package.
- Grab the code from the repository and install the `proto` package.
The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
compiler, protoc, to find it.
The compiler plugin, `protoc-gen-go`, will be installed in `$GOPATH/bin`
unless `$GOBIN` is set. It must be in your `$PATH` for the protocol
compiler, `protoc`, to find it.
- If you need a particular version of `protoc-gen-go` (e.g., to match your
`proto` package version), one option is
```shell
GIT_TAG="v1.2.0" # change as needed
go get -d -u github.com/golang/protobuf/protoc-gen-go
git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG
go install github.com/golang/protobuf/protoc-gen-go
```

This software has two parts: a 'protocol compiler plugin' that
generates Go source files that, once compiled, can access and manage
Expand Down

0 comments on commit 593363e

Please sign in to comment.