when I build a module locally, I need to adjust the location in the calling modules go.mod file using the local directory structure relative to the calling modules location. example below:
$ go mod edit -replace=example.com/theirmodule@v0.0.0-unpublished=../theirmodule
$ go get -d example.com/theirmodule@v0.0.0-unpublished
More info here…
/https://go.dev/doc/modules/managing-dependencies#naming_module