This is a creation in Article, where the information may have evolved or changed.
In the Windows environment:
1. First, you must first have go, the default is installed in the C:\Go
2. Then download protoc,https://code.google.com/p/protobuf/downloads/list, the next binary file, for convenience, can be placed directly into the C:\GO\bin inside
3. Configure Gopath, this is your go project place, should be configured early, such as D:\project\xxx
4.cmd run Go get-u code.google.com/p/goprotobuf/{proto,protoc-gen-go}, looks like win below the pit, will error, so you can separate input go get-u Code.google.com/p/goprotobuf/proto and Go get-u code.google.com/p/goprotobuf/protoc-gen-go
5. Copy the Protoc-gen-go.exe of the bin in the Gopath directory into the C:\GO\bin .
6. Then you can run Protoc, the command is Protoc--go_out=. *.proto
In the Linux environment:
1. Just like win, the default path is/usr/local/go
2. Download https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2, unzip directly,./configure,make,make Install
3. Like win, configuration Gopath can be changed directly in ~/.BASHRC
4. Run the go get-u code.google.com/p/goprotobuf/{proto,protoc-gen-go} directly
5. Similar to win
6. As with win