Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Simplify mounting of project sources to plugins

On Tue, 2019-01-22 at 17:32 +0200, Oleksandr Garagatyi wrote:
In Go world projects are located by the GOPATH. Usually, GOPATH env var is exported in bash profile or so. E.g. export GOPATH=/home/user/go
After that Go compiler and utils follow next structural location of files:
$GOPATH/src <- projects AND dependencies (though dependencies not always go here)
$GOPATH/bin <- compiled and packaged Go apps (usually added to PATH to launch tools from it, often used for go based linters and other Go related tools)
$GOPATH/src contains folders that represent Go packages and usually include source hosting like github.com or golang.org.
For example, when I'm working on Che broker repo my path is $GOPATH/src/github.com/eclipse/che-plugin-broker or /home/gaal/workspace/go/src/github.com/eclipse/che-plugin-broker on my system in particular.
All the Go tools like linters, compiler, and others expect GOPATH to be populated in the system and structure to be respected. 

Hope it helps. If not, please, let me know.

Thanks for the explanation. Howerver, I don't think it's a problem for the tooling, because the tooling will be installed in the plugin sidecar, where we control the value of $GOPATH (as well as in the Theia container). Why should GOPATH not be /projects?

/Thomas



Back to the top