In the module ‘worker’ I import ‘data’. I use ‘go get -u github.com/thisdougb/data/’, so data is referenced in worker/mod.go with a version.
What is the Go approach to avoid the round trip of commit/push/go get, and instead reference ‘data’ via the local filesystem during development? So as I save changes (pre commit) my ‘worker’ module picks up the changes.
However, you do need to keep local “data” path available for import and must have a go.mod in it. You then need to clone github.com/thisdougb/data into the relative path ./tmp/local/data.
The local import pathing can also accept absolute path.
Normally I would remove the clause before I commit a release. If you decide to keep it. You must ensure the distribution is capable to getting its own “data” package in the specified path.