You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a go.mod file already contains a replacement of one module by another (not a directory), gohack get -vcs checks out the original repository, not the current replacement. Also, gohack get (without -vcs) does check out the correct code, but puts it in the directory for the original module, not the replacement module, which is probably wrong.
If we run gohack get -vcs gopkg.in/errgo.v2, it checks out gopkg.in/errgo.v2 to $GOHACK/gopkg.in/errgo.v2, where we actually want it to check out github.com/rogpeppe/test2/arble to $GOHACK/github.com/rogpeppe/test2/arble and end up with a go.mod file like this:
When a go.mod file already contains a replacement of one module by another (not a directory),
gohack get -vcs
checks out the original repository, not the current replacement. Also,gohack get
(without-vcs
) does check out the correct code, but puts it in the directory for the original module, not the replacement module, which is probably wrong.For example, given this
go.mod
:If we run
gohack get -vcs gopkg.in/errgo.v2
, it checks outgopkg.in/errgo.v2
to$GOHACK/gopkg.in/errgo.v2
, where we actually want it to check outgithub.com/rogpeppe/test2/arble
to$GOHACK/github.com/rogpeppe/test2/arble
and end up with a go.mod file like this:The text was updated successfully, but these errors were encountered: