proposal: cmd/go: allow replacing a subdirectory within a package #30886
Labels
FrozenDueToAge
modules
Proposal
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Right now, the replace directive only allows replacing modules with different modules.
It'd be nice if you could just replace a single sub package within a module with a different package elsewhere in a different module.
My use case is that right now goimports does not support reordering imports when there are multiple groups (#20818) and so I forked
golang.org/x/tools
.Right now, I have to replace the entire module with my fork. I only modified
golang.org/x/tools/imports
so I only want to replace that package with the package from my fork. I don't want to maintain my fork and keep it up to date to use new additions togolang.org/x/tools
. I only want to maintain thegolang.org/x/tools/imports
package.The text was updated successfully, but these errors were encountered: