Closed jaronsummers closed 2 years ago
Ah, great. Thanks for addressing this. Older versions of the Protobuf library would allow you to fill in any duration string supported by Go's time.Duration
. So 5m
, 10h
, etc. was all valid. Later on they restricted it to just accept seconds, for consistency with the Protobuf implementations of other languages. This documentation hasn't been updated to reflect that.
I didn't see any really obvious places to stick a link in the readme, but I removed the suggested sentence, and also updated my quotes to be single-quotes like the other examples in that file.
google.protobuf.Duration's JSON behavior is not super intuitive so updating the example to be reflective of real usage will hopefully save someone some time