-
Notifications
You must be signed in to change notification settings - Fork 53
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
refactor: Make db stuff internal/private #291
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #291 +/- ##
===========================================
+ Coverage 63.30% 64.69% +1.38%
===========================================
Files 83 81 -2
Lines 9230 9035 -195
===========================================
+ Hits 5843 5845 +2
+ Misses 2771 2574 -197
Partials 616 616
|
7137e16
to
ba0f343
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.
LGTM. Although I suggest adding a comment to the Option
type along the lines of
Option is a function that, when applied, configures a field on
db
That would be inconsistent with the rest of our public members 😁 - jokes aside though - I think this pattern is pretty common in golang and would not be worth noting atm. Would perhaps be better to leave it as-is until we properly document it with the rest of public members? |
Sounds preferable not to over-document idiomatic patterns indeed. |
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.
LGTM.
* Remove Listen function from db package * Make Collection struct private * Remove unused structs * Make db.DB private
Part of #200
Makes everything in the db package that doesn't need to be public (db.NewDb, Errors, and the Options) private/internal. Had to do a bit of rejigging in the bench package, so watch out for that (results same as develop branch).
godocs now looks like this (
godoc -http=:6060
=> http://localhost:6060/pkg/github.com/sourcenetwork/defradb/db/):