Hi,

Having a default "go" folder inside your home directory is a recent change 
(I believe it was introduced in 1.8)

The mac installer may do extra steps, but my guess is that you started 
using Go before you set GOPATH to the dropbox folder, a simple 

go get <path of cool package here>

would create the $HOME/go  folder and subfolders you see.

If from now on you will only use your dropbox path as GOPATH, then it 
should be safe to delete the $HOME/go folder (may want to just rename it to 
be safe) and Go will not recreate it. I you do see it come back, then 
something isn't right with how you set up $GOPATH


BTW, the default $HOME/go path became a default GOPATH as a way to help new 
users get started with Go before they get familiar with how to setup env 
variables, etc but you can always override it if this path isn't right for 
you.

Hope that helps.

Diego




On Thursday, May 18, 2017 at 10:27:55 AM UTC-4, Sam Pollard wrote:
>
> I’m new to GO and fairly new to the command line on Mac (but having a lot 
> of fun learning :-) )
>
> Apologies in advance if this has been covered elsewhere. I’ve tried 
> searching but not found the answer.
>
>
> I’ve installed GO on two separate Macs, and started learning GO, written a 
> couple of extremely simple programs, got them running, all’s well.
>
>
> I’ve created my workspace inside my Dropbox folder and done what I think I 
> need to do inside my .bash_profile to make sure my GOPATH knows where to 
> find stuff.
>
>
> That done, I then realise that the installation of Go left a folder called 
> ‘go’ inside my home folder. That ‘go’ folder has subdirectories called bin, 
> src, pkg. 
>
> I’m assuming that this is Google’s way of saying, you’re going to need a 
> workspace, let us create one for you. 
>
> That workspace is not empty. There are, indeed, several layers of nested 
> subfolders, containing quite a lot of ‘stuff’, the purpose of which I’m not 
> at all clear about at the moment. I can only assume it’s ‘stuff’ which 
> Google thinks I may need at some point. 
>
> (The binaries named go, godoc, gofmt are tucked away in usr/local/go/bin 
> where we’d expect them to be).
>
>
> I must admit, it seems odd that in the documentation I couldn’t find any 
> reference to this ‘workspace’, nor do any of the various tutorials/videos 
> that I’ve watched mention it.
>
>
> My question: can I simply move the contents of that ‘go’ folder to the 
> workspace I’ve created in my Dropbox folder?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to