Skip to content

Test Well Known Types#1273

Closed
hectorcast-db wants to merge 5 commits into
mainfrom
hectorcast-db/test-well-known-types
Closed

Test Well Known Types#1273
hectorcast-db wants to merge 5 commits into
mainfrom
hectorcast-db/test-well-known-types

Conversation

@hectorcast-db

Copy link
Copy Markdown
Contributor

DO NOT MERGE

@github-actions

Copy link
Copy Markdown

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1273
  • Commit SHA: 5d13d98cd47f4c3ffdfd9246be85852b2e388c53

Checks will be approved automatically on success.

@parthban-db parthban-db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use the google type instead of the standard types. As that's what we will offer in the future.

Comment thread common/types/duration.go
// customDur := types.NewDuration(30 * time.Second)
// goDur := customDur.Duration // Access the underlying time.Duration
type Duration struct {
time.Duration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants