-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
*: support Go modules #501
Conversation
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.
Sweet.
ErrExec ErrorType = "execution" | ||
ErrBadResponse ErrorType = "bad_response" | ||
ErrServer ErrorType = "server_error" | ||
ErrClient ErrorType = "client_error" |
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.
Where is this change coming from? Is it needed/intended?
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.
It was spotted by the newer version of staticcheck that is compatible with Go modules:
api/prometheus/v1/api.go:58:2: only the first constant in this group has an explicit type (SA9004)
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.
It is definitely needed. A common misbelief is that type declaration behaves similar to iota. These types were declared without an explicit type and mostly just worked due to Go's automatic type inference.
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.
Ah cool, thanks.
go.mod
Outdated
|
||
require ( | ||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 | ||
github.com/gogo/protobuf v1.1.1 |
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.
Inclusion of this happens via prometheus/wrap_test.go, but it's an accident from my side.
I'll send you a PR to fix, and then this should be updated to not include this line.
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.
Once gogo/protobuf is gone (or you might prefer to do it in a separate commit/pr).
Signed-off-by: Simon Pasquier <[email protected]>
44f3721
to
f626bd2
Compare
@beorn7 I've rebased on top of master and |
Yay. |
No description provided.