README.md: document how to build a specific version of protoc-gen-go (#764)
diff --git a/README.md b/README.md
index 09e0772..04a52df 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,19 @@
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