Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在golang中有这个结构
struct File { name string creatation_time time.Time }
我如何在 protobuf3 中编写它?
创建example.proto;
syntax = "proto3"; import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" message File { string name = 1; google.protobuf.Timestamp creatation_time = 2; }
编译后检查 example.pb.go 中已创建的结构定义。