Closed machawk1 closed 8 years ago
@ibnesayeed The *Archives is akin to a pointer (Go probably has its own name for it) but the Linter complains. Suggestions on remedying this?
I was not too much into linting it as the code really need some serious refactoring. Let me have a look at whats the complain about the *Archive thing and then I will see what can be done about it.
I don't see it being names something else anywhere else or I am failing to understand the suggestion by the linter well.
I don't see anything wrong according to the Receiver Names code review comments.
Be consistent, too: if you call the receiver "c" in one method, don't call it "cl" in another.
Maybe the linter is having issues with:
func (slice Archives)
vs
func (a *Archives)
Yes, you were right, that was the issue. I have fixed and pushed the code. I would encourage you to make a pull request of your other changes in 11503d3 as well.
I merged 11503d3bc58fc4ca8ce1cb2e6685f8ae8a7b66ee but need to re-validate the lint before closing this issue.
That fixed the Receiver issue, @ibnesayeed , but the comment issues still need to be resolved to close this ticket.
Yes, we will keep this issue open. Investing of comments only makes sense after doing some refactoring. There is no point on adding comments just to pass the lint that might changes latter. I came to know something about the function arguments little late that I would like to do when refactoring. Which might actually change the function signatures, but would make them more compact.
Largely an issue of style but until we have some CI system setup for the repo, we ought to at least align with convention per
https://github.com/golang/lint
.