go get ./
go run main.go
cd client
go run client.go
-
install protoc
first, go to protobuf release page, download a suitable platform, then add the execution file to $PATH -
run command to generate the template file to current dir
cd greeter
# 删除greeter.pd.go, greeter.pb.micro.go
protoc --micro_out=. --go_out=. ./gretter.proto