-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add Makefile for development #67
Conversation
Makefile
Outdated
# your terminal as a command to run, and then see the code coverage output locally. | ||
.PHONY: cover | ||
cover: | ||
$(AT) go install golang.org/x/tools/cmd/cover |
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 do we need to install the cover tool?
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.
Well what do you know - you don't! Good catch. You used to need this, I've been copying and pasting this for years effectively heh. I deleted it, and also ran go mod tidy
within a clean Docker container.
Hello, and thanks for the PR! Looks good, just have the one question about the install of cover tool. |
Hello thanks for the fix. One more thing... I feel like this may be a dumb question but what's the point of the new Example:
|
Yea that one is a little counterintuitive...so: Golang Modules need to have a reference to every thing you import to pick them up, it's not like Glide or Dep where you can specify something to always install. Luckily, Golang Modules pick everything up regardless of tag. Note that the tools file has As to the install - this is necessary to build the binary so that it is available. The install part puts it into |
Oh right that makes sense. Thanks for the explanation and the PR! |
This adds a simple Makefile for development.
This Makefile:
golint, errcheck, staticcheck
)A data race was also fixed.
Note that
errcheck
andstaticcheck
do not pass yet but this is a good start. Let me know if this is helpful!