-
Notifications
You must be signed in to change notification settings - Fork 310
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
Combine both TimeInterval types into single type #75
Combine both TimeInterval types into single type #75
Conversation
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
==========================================
+ Coverage 57.13% 57.61% +0.47%
==========================================
Files 76 77 +1
Lines 3719 3770 +51
==========================================
+ Hits 2125 2172 +47
- Misses 1570 1573 +3
- Partials 24 25 +1
Continue to review full report at Codecov.
|
internal/utils/time_interval.go
Outdated
) | ||
|
||
const ( | ||
// ErrEndBeforeStart is an the error message for when a TimeInterval's end time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superfluous the
?
Also, I'm from the camp which avoids over-commenting, which in this case, IMO, this would be. Sometimes unnecessary comments can be just as bad as missing comments. I do understand its a personal thing mostly.
Scratch that, its exported. I'm blind.
5a246ba
to
c29f7c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good!
Query generation and Cassandra's query running both used a type called TimeInterval that did roughly the same thing. This change combines the two into one type that can be used from the utils package in internal/. This improves code reuse and keeps the two representations in sync, and also increases the testability of the code.
c29f7c7
to
3ce1a1f
Compare
Hey @antekresic , asking for a re-review because I added I also rewrote the tests to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes, looking good!
Query generation and Cassandra's query running both used a type
called TimeInterval that did roughly the same thing. This change
combines the two into one type that can be used from the utils
package in internal/. This improves code reuse and keeps the two
representations in sync, and also increases the testability of
the code.