Tags: isgasho/gohack
Tags
main: fix definition and implementation of relative GOHACK (rogpeppe#49) rogpeppe has a far sharper brain than me and pointed out a major issue with the previous implementation: that we hadn't actually implemented a relative value of GOHACK relative to the main module.
Allow relative paths in GOHACK env var (rogpeppe#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 rogpeppe#44
Merge pull request rogpeppe#37 from rogpeppe/018-update-go-internal use github.com/rogpeppe/go-internal@v1.0.0
Merge pull request rogpeppe#31 from rogpeppe/017-fix-undo-bug gohack undo: restore old replace comment correctly