goenv icon indicating copy to clipboard operation
goenv copied to clipboard

Docs for migrating to version 2

Open GrahamWalters opened this issue 5 years ago • 3 comments

First off, thanks for the great tool. I've run into a few problems since upgrading from version 1.X brew install --HEAD goenv

Previously I had the following in my .bash_profile, which seemed to work ok

if which goenv > /dev/null; then eval "$(goenv init -)"; fi
export GOPATH="$HOME/go"
export PATH="$GOROOT/bin:$PATH"
export PATH="$GOPATH/bin:$PATH"

The docs for GOENV_DISABLE_GOPATH specify:

It's recommend that you use this (as set to 0) to avoid mixing multiple versions of golang packages at GOPATH when using different versions of golang. See https://github.com/syndbg/goenv/issues/72#issuecomment-478011438

So now I have the following in my .bash_profile and I'm leaving goenv to manage my GOPATH

if which goenv > /dev/null; then eval "$(goenv init -)"; fi
export PATH="$GOROOT/bin:$PATH"
export PATH="$GOPATH/bin:$PATH"

Currently my projects are all in the $HOME/go/src dir:

/Users/gw/go/src/gitlab.com/GrahamWalters/project-a (1.11.4)
/Users/gw/go/src/gitlab.com/GrahamWalters/project-b (1.12.7)
  1. Can you confirm I should be moving them into the versioned dirs $HOME/go/version/src?
/Users/gw/go/1.11.4/src/gitlab.com/GrahamWalters/project-a (1.11.4)
/Users/gw/go/1.12.7/src/gitlab.com/GrahamWalters/project-b (1.12.7)
  1. Alternatively, is it possible to only separate the binaries? Something like the following
/Users/gw/go/src/gitlab.com/GrahamWalters/project-a (1.11.4)
/Users/gw/go/src/gitlab.com/GrahamWalters/project-b (1.12.7)
/Users/gw/go/1.11.4/bin/project-a
/Users/gw/go/1.12.7/bin/project-b

GrahamWalters avatar Jul 24 '19 02:07 GrahamWalters

@dmlittle can this please get released or at least the readme updated to use --HEAD, just came back to this again because a fresh install refused to install 1.13

grosser avatar Mar 01 '20 19:03 grosser

@grosser I've contributed PRs adding new versions of Go to goenv but I'm not the owner/maintainer of this project. I think you might have intended to tag @syndbg?

dmlittle avatar Mar 01 '20 20:03 dmlittle

ah thx, I just picked the name from the latest commit :D

On Sun, Mar 1, 2020 at 12:11 PM Donald Little [email protected] wrote:

@grosser https://github.com/grosser I've contributed PRs adding new version of Go to goenv but I'm not the owner/maintainer of this project. I think you might have intended to tag @syndbg https://github.com/syndbg?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/syndbg/goenv/issues/89?email_source=notifications&email_token=AAACYZ36IGR4RV2GMWTVZYLRFK6QTA5CNFSM4IGLSMKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENNJOVY#issuecomment-593139543, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACYZ5KD5RKKCXFNYQH3WLRFK6QTANCNFSM4IGLSMKA .

grosser avatar Mar 01 '20 20:03 grosser