I was thinking of doing that for convenience. Has anyone had any problems with name collisions?
I always use $HOME as $GOPATH.
I’m using “/tmp/gopath” as my
$GOBIN=/usr/local/bin. I think this way is the future.
So no troubles mixing go stuff with no go stuff in bin or src? awesome.
From my point of view is no problem to have $GOPATH in $HOME. More than this I also use an installer who build the entire Go environment based on $HOME as root for instalation and also for $GOPATH. I guess you shouldn’t make worries, having
src folder basically won’t interfere with nothing else.
If you have a mixed environment (let’s say you develop in other languages) can be a good idea to use
src (source folder) also for other projects written in other languages (that’s what I’m doing).
Example of my $HOME folder structure (related to Go):
/bin /go /bin /src /src/ /github.com /go_project /other_language_project /projects /go_project /other_language_project /tests
Actually, there’s no relevant info there.
standardisation has its benefits for communication with other coders
that being said
C:\>TYPE %USERPROFILE%\go.bat @ECHO off ECHO go1.10.2 SET GOPATH=%USERPROFILE% C:\>
on Un*x one could place a shell script in $HOME and source it
or one could code a modified variable in a user customisation file
%USERPROFILE% contains blank spaces double quote the variable