Skip to content
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

Merged
merged 1 commit into from
Nov 16, 2018
Merged

*: support Go modules #501

merged 1 commit into from
Nov 16, 2018

Conversation

simonpasquier
Copy link
Member

No description provided.

Copy link
Member

@beorn7 beorn7 left a 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"
Copy link
Member

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?

Copy link
Member Author

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)

https://github.com/dominikh/go-tools/blob/master/cmd/staticcheck/docs/checks/SA9004

Copy link
Member

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.

Copy link
Member

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
Copy link
Member

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.

Copy link
Member

@beorn7 beorn7 left a 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]>
@simonpasquier
Copy link
Member Author

@beorn7 I've rebased on top of master and go mod tidy properly detected that gogo/protobuf isn't needed anymore.

@beorn7
Copy link
Member

beorn7 commented Nov 16, 2018

Yay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants