Commit dfdb24e
authored
Handle nil timestamps in query parameters. (#389)
We represent timestamps as `*time.Time`. However, when a nullable
timestamp is serialized to query parameters in paths.go, we panic on the
nil pointer. This patch adds a helper to wrap time formatting to safely
check and omit nil timestamps.
Note: I think we shouldn't represent all timestamps, including
non-nullable timestamps, as `*time.Time`, but I'll think about that in
another patch.1 parent c14d206 commit dfdb24e
3 files changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 429 | + | |
433 | 430 | | |
434 | 431 | | |
435 | 432 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
0 commit comments