-
Notifications
You must be signed in to change notification settings - Fork 531
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 $GOBIN #41
Add $GOBIN #41
Conversation
- Set $GOBIN to $(go env GOPATH)/bin - Add $GOBIN to the PATH Should make the setup of tools like golangci-lint or golint work with a simple `go get`. Using $GOBIN instead of $GOPATH/bin because the goal is to have GOPATH not being directly referenced. Also, in the future, GOBIN will have a default value too, so we would not need to manually set it, just add it to the path (see discussion in golang/go#23439). Closes #14.
1.14.0 satisfies ^1.13.6, so the test started failing once Go 1.14 was released. This test is going to break again when Go 1.15 is released, so maybe we need a better fix?
To see how this can be used: https://github.com/fsouza/vod-module-sprite/pull/15/files (Also notice the previous workaround in the "setup GOBIN" step). Commit 25c870b caused the tests to fail because what seemed to be an incorrect/fragile test. "1.14.0" satisfies "^1.13.6" (and it looks like semver doesn't support the ~ operator yet, which is likely what the test is designed to test?) I adjusted the test to make it green (using ^1.14.0 instead of ^1.13.6), but if we keep that test as is, it's going to fail every time there's a new "minor" release of Go. |
Should fix the behavior on Windows.
On Windows, `go env GOPATH` keeps the end-line character, making it unusable (see sample build failure: https://github.com/fsouza/vod-module-sprite/runs/478762225?check_suite_focus=true#step:5:62).
@bryanmacfarlane friendly ping? 😁 |
I'm waiting for this feature :) |
Implemented in #47. |
Thank you @fsouza for raising the issue. |
Should make the setup of tools like golangci-lint or golint work with a
simple
go get
.Using $GOBIN instead of $GOPATH/bin because the goal is to have GOPATH
not being directly referenced. Also, in the future, GOBIN will have a
default value too, so we would not need to manually set it, just add it
to the path (see discussion in golang/go#23439).
Closes #14.