Skip to content

Conversation

zeripath
Copy link
Collaborator

When using modules it is not guaranteed that GOPATH will be set, instead
use the build.Default.GOPATH which will be overriden by os.Env when
GOPATH is set, but will still be a reasonable path if not.

Signed-off-by: Andrew Thornton [email protected]

When using modules it is not guaranteed that GOPATH will be set, instead
use the build.Default.GOPATH which will be overriden by os.Env when
GOPATH is set, but will still be a reasonable path if not.

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Collaborator Author

It may also be worth considering changing the other places that use os.Env("GOPATH") to use this instead.

@techknowlogick techknowlogick merged commit 2b45a43 into techknowlogick:main Jun 26, 2021
@zeripath zeripath deleted the use-build-default-to-provide-gopath branch June 26, 2021 16:16
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.

2 participants