I'd appreciate help with setting up a workspace, involving two modules that
exist only on my local disk and not in any SCM.  I understand how to create
the workspace and use both modules in it.  What I can't figure out is how
to add a dependency from mod1 to mod2 in mod1's go.mod file.

The supported means of adding dependencies in go.mod files is the go get
command.  But if I go into mod1's directory and run "go get path/to/mod2",
it tries to download it from github and fails.  I cannot figure out how to
tell go get to use the version that's on my local disk, even though the
workspace says it should.

Similarly, I can't figure out how to add the necessary go.mod and go.sum
entries manually.  The documentation explicitly warns against trying to do
so, anyway.

It seems like this is exactly the case workspaces were designed for,
developing two modules at once, and yet I've had no success in getting it
set up.  Any suggestions?

Regards,
Steve

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAAnpqKFYPXiLQ0E3-mE2RT-XpkzHeHfwFu3mOJKfWqMht7ebRw%40mail.gmail.com.

Reply via email to