halle
halle

Reputation: 31

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

Upvotes: 3

Views: 5308

Answers (1)

Mostafa Solati
Mostafa Solati

Reputation: 1235

Try this :

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

protoc --gogofaster_out=./ duration.proto

Upvotes: 0

Related Questions