072c6d9aed
We've previously been copying this function around so it could remain unexported while being used in various packages. However, it's a non-trivial function with lots of specific assumptions built into it, so here we'll put it somewhere that other packages can depend on it _and_ document the assumptions it seems to be making for future reference. As a bonus, this now uses os.SameFile to detect when two paths point to the same physical file, instead of the slightly buggy local implementation we had before which only worked on Unix systems and did not correctly handle when the paths were on different physical devices. The copy of the function I extracted here is the one from internal/initwd, so this commit also includes the removal of that unexported version and updating the callers in that package to use at at this new location. |
||
---|---|---|
.. | ||
testdata | ||
doc.go | ||
from_module.go | ||
from_module_test.go | ||
getter.go | ||
load_config.go | ||
module_install.go | ||
module_install_hooks.go | ||
module_install_test.go | ||
testing.go | ||
version_required.go |