[GODRIVER-2381] Extending Comparison API for `primitive.Timestamp` Created: 12/Apr/22 Updated: 12/Dec/22 Resolved: 12/Dec/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Preston Vasquez | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
SummaryThe `primative.Timestamp` struct only has one comparison method that is sort of hard to use without reading the code. It might be helpful to add `Before` and `After` receiver functions in the style of the time package. MotivationWho is the affected end user?Clients using the `primitive.Timestamp` struct with bson documents. How does this affect the end user?This would add a more comprehensive API to our timestamps that follow practice established by a package would likely be familiar with, i.e .the go time package. How likely is it that this problem or use case will occur?This functionality would probably not be needed often. If the problem does occur, what are the consequences and how severe are they?Very minor inconvenience. Is this issue urgent?No. Is this ticket required by a downstream team?No. Is this ticket only for tests?No. |