Dnia 2021-02-20, o godz. 04:10:38
Peter Kleiweg <pklei...@xs4all.nl> napisaƂ(a):

> Suppose I am writing a package that is in its own module, and I want
> to test it. Not with unit tests, but with a larger program that uses
> other non-standard packages as well.
[...]
> How do I get this right?
> 
> Is there a way to tell go.mod that it should use local files instead
> of a repository, just for the development phase?

No. You can not replace *files*. You can use workaround with 
briliant hack of https://github.com/rogpeppe/gohack

Other hack is to have two or more modules you want to tinker with
vendored simultaneously to "all interested parties". This can be achieved 
in Linux as shared mount, on other OS it need to be exact copy.
It is tedious but works.

Look at https://github.com/golang/go/issues/27542#issue-357818109 and
https://github.com/golang/go/issues/37755 to get hints about other hacks
people conceived to be able to work on interdependent code.

Hope this helps, 

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
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/20210220134428.76fd225f%40xmint.

Reply via email to