编译
protoc --go_out=plugins=grpc:./helloworld/ ./helloworld.proto
只会生成一个pb.go文件,既可以作为client也可以作为server。
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./helloworld.proto
在当前目录生成pb.g和grpc.go文件
protoc --go_out=. --go-grpc_out=. helloworld.proto