-
Notifications
You must be signed in to change notification settings - Fork 622
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
Part of: Lint Go Code #49 #223
Conversation
Codecov Report
@@ Coverage Diff @@
## main #223 +/- ##
==========================================
+ Coverage 56.07% 56.73% +0.66%
==========================================
Files 74 73 -1
Lines 3089 2990 -99
==========================================
- Hits 1732 1696 -36
+ Misses 1186 1142 -44
+ Partials 171 152 -19
Continue to review full report at Codecov.
|
I like that you separated commits by package. We should not lint |
@@ -6,21 +6,21 @@ import ( | |||
"sync" | |||
) | |||
|
|||
type key []byte |
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.
why make this one public?
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.
Intersection()
is a public method which returns an array of items of Key
type which itself is not public.
@@ -60,15 +60,15 @@ func New() *Tree { | |||
} | |||
} | |||
|
|||
func (dstTrie *Tree) Merge(srcTrieI merge.Merger) { |
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.
I know the linter says these names should be consistent (actually, I couldn't find the rule that enforces this), but I kinda feel in this particular case it's useful to have this src / dst distinction.
What do you all think about this? @AdrK @kolesnikovae
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.
I would go with consistent approach. Reader of this file should quickly learn what t
stands for. Also, naming as dstTree
and srcTree
might suggests that both those vars came as an arguments and this method can work on two arbitrary trees, while it can only merge a tree provided by argument with itself and t
denotes it ( like self
in Python ).
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.
Yeah, good points, I think I'm in favor of t now
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.
Looks good. I added a couple of comments. We should definitely add agent/pprof to the list of exceptions
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
Datasource: Add query type switch
No description provided.