Mon, Jan 1, 0001

protocol buffer教程 protocol buffer安装及使用 安装protocol buffer代码生成工具:点击下载(直接下载可执行程序即可),把可执行程序放置在系统path目录中,以便通过命令protoc使用 protocol buffer生成golang代码需要安装对应的golang插件,把可执行程序放置在系统的path目录中即可。点击下载,推荐使用其中的插件protoc-gen-gofast protoc-gen-gofast生成的代码需要依赖对应protocol buffer的库protobuf,点击下载 使用命令 protoc –gofast_out=. myproto.proto 生成代码 参考文档: 在 Golang 中使用 Protobuf protocol buffer语法 以下只针对protobuf3进行使用介绍 参考文档: Protobuf3语言指南 protocol buffer内部原理 参考文档: Google Protocol Buffer 的使用和原理