我在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
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以获取已创建的结构定义.