Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Conversation

@hectorj
Copy link
Contributor

@hectorj hectorj commented Jun 25, 2017

Hi!

I have a list of paths as GOPATH, and I was getting absolute paths for all the goPackagePath values in my generated deps.nix.

So I refactored the gopath trimming used by currentPackage() into a separate function, and used that in NewPackage() instead of the strings.TrimPrefixthat was there.

@kamilchm
Copy link
Owner

Hi, thx for PR.
Could you provide an example of GOPATH that you want to support?

@hectorj
Copy link
Contributor Author

hectorj commented Jun 26, 2017

Sure. In my case it was a 2 paths list : /home/hectorj/myProjectRepo/go:/home/hectorj/go.

And my issue was that I ended up with values like /home/hectorj/myProjectRepo/go/src/github.com/someUser/someRepo as deps' goPackagePath instead of just github.com/someUser/someRepo

@kamilchm
Copy link
Owner

Thx, I'll look at it shortly.

@kamilchm kamilchm merged commit 67b396b into kamilchm:master Jun 29, 2017
@hectorj hectorj deleted the fix-gopath-list branch October 30, 2017 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants