New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: native types for timestamps and durations #87
Comments
Yes, this is #50. |
I read this issue as requesting to use |
That seems like only a secondary issue. (Not all Go I think the more significant issue is that some programs copy (subsets of) protocol messages to other protocol messages. For some subset of those programs, (un)marshaling all the way through |
I'd say the needless overhead is making us redefine entire new structs and copying every field of the protobuf to it just so we can persist in Google Datastore or Google Spanner. Super frustrating. We already have this datetime fragmentation in java and c++... please don't carry the torch to Go. Don't make program in circles for "some subset of those programs". |
Hi!
There are standard messages for timestamps and durations:
https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto
https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto
At the moment, using these from Go is a bit cumbersome and requires manual work and boilerplate to conver them to and from native types.
Having the proto3 generator using native types for those well known messages would make them much nicer to use from Go.
Thanks!
The text was updated successfully, but these errors were encountered: