myitcv
released this
29 Mar 14:56
Allow relative paths in GOHACK env var (#45)
Prior to this change, we were using `filepath.Join()` to derive a
replacement for the module dir. But this is not enough to
support relative directories, as `Join()` cleans the resulting path,
removing any `"./"` prefix (which is needed by the replace drective when
using a local directory).
This change adds the `"./"` prefix if the user specified it in the GOHACK
env var.
Note that relative parent directory `".."` is not cleaned by
`filepath.Join()`, so we do not need to cater to this case, and an added
test proves that this works.
fixes #44