简体   繁体   中英

how to store time.duration in protobuf3

in proto file...

syntax = "proto3";

import "google/protobuf/duration.proto";

message aaaResponse{
  google.protobuf.Duration  min   = 2;
 }

... will auto generate *duration.Duration

how to change the proto file to get time.Duration

Try this :

go get github.com/gogo/protobuf/protoc-gen-gogofaster

protoc --gogofaster_out=./ duration.proto

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM