Test Well Known Types#1273
Conversation
|
Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes. |
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
parthban-db
left a comment
There was a problem hiding this comment.
I think we should use the google type instead of the standard types. As that's what we will offer in the future.
| // customDur := types.NewDuration(30 * time.Second) | ||
| // goDur := customDur.Duration // Access the underlying time.Duration | ||
| type Duration struct { | ||
| time.Duration |
There was a problem hiding this comment.
I thought this would be a wrapper over the Google types, as the marshalling/unmarshalling function will be defined by the Google library. It's just that it is not a JSON marshal.
There was a problem hiding this comment.
We were split between native types (better CUX) and well known types (easier code) and decided for the second. Since well known types do support native json marshall, we do need to wrap and convert anyway. So the reason to use well known does not exist anymore.
DO NOT MERGE