how to store time.duration in protobuf3

4.5k Views Asked by At

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

1

There are 1 best solutions below

0
On

Try this :

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

protoc --gogofaster_out=./ duration.proto