-
Notifications
You must be signed in to change notification settings - Fork 881
Codersdk: make workspace_build.deadline a pointer #2015
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
Comments
Since we're starting to have quite a few pointers, I would suggest two options:
For 1. we could either maintain our own package of types used by the API, or rely on pre-existing work. One example is https://github.com/guregu/null/blob/21596e8e52a426a14cd73b22f6ffa4d31165302f/time.go#L12-L16. These would support JSON (de-)marshaling and be slightly safer to use than pointers (and dereferencing). For 2. first I would like to ask: Why does the frontend need to pass |
Fixes #2015 Co-authored-by: Joe Previte <[email protected]>
What
Change this
To this:
Why
The FE currently needs to check for the zero-value of
time.Time
for 'falsey' values.Making this a pointer would allow passing
null
and avoid this need.The text was updated successfully, but these errors were encountered: