-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GVM workflow for newbies #46
Comments
Oh dear, this might actually be a bug in GVM. The reason why external libraries are being place in the same directory as your code is because your It looks like GVM might have to change the order of the paths in |
Hmm...however, the first path is also used for installation and the Hmm, this is a tricky one... |
I can safely say that I know considerably more about GOPATHs after reading On Thu, Jan 2, 2014 at 10:20 PM, Manoj Dayaram notifications@github.comwrote:
|
I've confirmed I'm having the same problem.
This issue is really old. Are pkgsets basically unusable at this time? |
@wesm-outreach Yes, I'm still facing this same issue and it's essentially caused me to drop In my [[ -s "${HOME}/.gvm/scripts/gvm" ]] && source "${HOME}/.gvm/scripts/gvm"
export GOPATH=/code/go
export PATH=$PATH:$GOPATH/bin I use direnv for my repos, and in that I use: CUR_GOPATH=${GOPATH}
gvm use go1.11.1
export GOPATH=${CUR_GOPATH} whereas ideally I could do: gvm use go1.11.1
gvm pkgset use --local Unfortunately until this is resolved I'm basically sticking to this pattern. |
As a Go newbie, I am battling to get my workflow right.
I have installed Go 1.2 as per the GVM instructions.
I want to be able to have my Go projects eg.
ProjectA
andProjectB
in a directory say ~/side_projects.What I have tried so far is outlined below:
$GOPATH
now returnsI then created a
hello-world.go
and atest-package.go
file.hello-world.go:
test-package.go
go run hello-world.go
complained so I had to move all the code into asrc
directory, and then placetest_package.go
into a directory with the same name, and then things worked as expectedThen I installed Revel via
go get github.com/robfig/revel
, and the problem is best explained with a screenshot:Here is
/home/lee/side_projects/ProjectA
Here is
/home/lee/side_projects/ProjectA/src
The third party packages are now mixed with my own, and now i am pretty confused.
.gvm-local
folder?src
andpkg
directories, where do I place my application code? Directly insrc
? I don't want my code sitting in the same directory as external libraries as it currently happening.src
, or inProjectA
, and add pkg to gitignore? (Assuming I can get the external packages to go into .gvm-local)?The text was updated successfully, but these errors were encountered: