一、介绍
通过后面的基础知识的解说,咱们理解到了 protoc 命令的作用,帮咱们自动化生成
go代码。次要有.pb.go 以及_grpc.pb.go 文件。
目前的代码我放到了github上,能够查看残缺的代码。https://github.com/hisheng/grpc-demo1
咱们再温习一下以后的目录构造如下:
➜ grpc-demo1 git:(master) ✗ tree.├── Makefile├── api│ ├── hello.pb.go│ ├── hello.proto│ ├── hello_grpc.pb.go│ ├── user.pb.go│ ├── user.pb_test.go│ └── user.proto├── go.mod└── go.sum1 directory, 9 files