go精通protobuf连载四:ProtoBuf的golang支持库protobuf-go源码阅读

一、golang/protobuf介绍

protobuf提供了go语言的支持库protocolbuffers/protobuf-go。
官方地址

https://github.com/protocolbuffers/protobuf-go

这个包主要提供了以下几个模块

包介绍
proto针对protobuf的messages,提供了序列化,和反序列的方法。
encoding针对protobuf的messages,转化json,text等
compiler/protogen支持 protoc的插件
cmd/protoc-gen-goprotoc插件,把.proto文件 生成.pb.go文件

一、proto包源码阅读
一、encoding包源码阅读
三、protogen包源码阅读
四、protoc-gen-go包源码阅读

评论

暂无评论