-
Notifications
You must be signed in to change notification settings - Fork 513
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
Export GOBIN env var #193
Comments
Check that your code is inside GOPATH:
https://stackoverflow.com/a/25216795/433558
|
Yes, it is. Repro steps:
Last command fails for me with If after that I do:
Install now passes, binary gets stored in To fix this, in all golang Docker files probably it should be enough to add after lines like https://github.com/docker-library/golang/blob/master/1.9/stretch/Dockerfile#L46 something like
|
Later answers in the linked stackoverflow are the key: https://stackoverflow.com/a/36717762 and https://stackoverflow.com/a/39952720.
So I would say that if you are using $ go install --help
usage: install [build flags] [packages]
Install compiles and installs the packages named by the import paths,
along with their dependencies.
For more about the build flags, see 'go help build'.
For more about specifying packages, see 'go help packages'.
See also: go build, go get, go clean. |
@yosifkit thanks for heads up.
So I understand this that Another problem is that github.com/nats-io/go-nats-streaming/examples has multiple apps, each should be in it's own package/dir for current Still I think it would not only not harm to have GOBIN explicitly set in golang Docker images, it would be helpful to better handle the inconsistencies. |
If we set |
NATS Streaming examples have been fixed, each example was refactored to be in it's own package/dir so documented It seems fix for inconsistency in I also understand concerns @tianon mentioned. AFAIC this issue can be closed. |
Please have
GOBIN
environment var defined in the Golang Docker images, so thatgo install
works without-o
switch.Now it fails with:
go install: no install location for .go files listed on command line (GOBIN not set)
The text was updated successfully, but these errors were encountered: