1.显示protobuf : protoc-gen-go: program not found or is not executable
首先配置环境变量并使其生效
vim ~/.bashrc
export PATH = "$PATH:$GOPATH/bin"
source ~/.bashrc
然后更新proto和protoc-gen-go包
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
2.编译生成的pb.go文件中,没有与服务相关的方法。后面我用了gRPC的中文官网中指定的方法,才可以正常生成pb.go文件
protoc --go_out=plugins=grpc:. *.proto