1, installation Protobuf
In https://github.com/google/protobuf/releases
Download
Protoc-3.5.1-win32.zip
Put the extracted protoc.exe into the gopath\bin.
2, Installation Grpc
Git Clone Https://github.com/grpc/grpc-go
Rename the grpc-go to grpc into google.golang.org with the full path as follows
D:\gopath\src\google.golang.org\grpc
3, Installation Genproto
Git Clone Https://github.com/google/go-genproto
Rename the clone down folder to Genproto and put it under google.golang.org, the full path is as follows
D:\gopath\src\google.golang.org\genproto
4. Download the text package
git clone https://github.com/golang/text.git
5. Download NET Package
git clone https://github.com/golang/net.git
6, installation Proto
Go get-u Github.com/golang/protobuf/proto
7, Installation Protoc-gen-go
Go get-ugithub.com/golang/protobuf/protoc-gen-go
8. Verification
Enter the following directory
Src\google.golang.org\grpc\examples\helloworld>
Execute Command Generation code HELLOWORLD.PB.GO
Protoc-i./helloworld--go_out=plugins=grpc:./helloworld./helloworld\helloworld.proto
Enter the Greeter_server to execute
Go Run main.go
Enter the Greeter_client to execute
Go Run main.go
2018/06/19 11:29:25 Greeting:hello World
Process finished with exit code 0