devbox
devbox copied to clipboard
Inconsistent GOPATH Setting in Devbox Go Examples
I'm using Devbox with Go and noticed an inconsistency that might confuse users.
In the documentation example on the website, the GOPATH is set to $PWD:
{
"packages": [
"go@latest"
],
"env": {
"GOPATH": "$PWD",
"PATH": "$PATH:$PWD/bin"
},
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {}
}
}
However, this differs from the example in the GitHub repository, which sets GOPATH to $HOME/go/:
devbox.json
{
"packages": [
"[email protected]"
],
"env": {
"GOPATH": "$HOME/go/",
"PATH": "$PATH:$HOME/go/bin"
},
"shell": {
"init_hook": [
"export \"GOROOT=$(go env GOROOT)\""
],
"scripts": {
"run_test": "go run main.go"
}
}
}
I think it would be helpful to align these examples or clarify the intended use cases, as the different GOPATH settings may cause confusion for users setting up their Go environments with Devbox.
Thanks!