Hacker News new | past | comments | ask | show | jobs | submit login

Main developer of vg here. In principle vg should work for packages outside of GOPATH when using full isolation mode (which has its own set of problem, see README for details). Its dep integration doesn't work then though last time I tried. As far as I can tell the main reason why Go tooling needs GOPATH is because everything uses absolute imports and relative ones can translated to absolute ones by always working from inside the workspace.

I've solved my main issue with GOPATH in a very easy way though. I just create symlinks in my normal directories (like ~/work) to my projects in GOPATH. This allows me to go to my own projects easily while still having everything in GOPATH.




I use zsh and there is an easy way to find your golang projects using cdpath:

    # setup easy access to cd paths
    
    setopt auto_cd
    cdpath=($HOME/code/go/src/github.com \
      $HOME/code/go/src/github.com/collinvandyck \
      $HOME/code \
      $HOME/code/go/src)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: