Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix import path prefix collisions (#8)
If two import paths have the same prefix, versioned imports are not generated correctly. For example, consider `k8s.io/api` and `k8s.io/apimachinery`. Running `mod upgrade -tag=12 -mod-name=k8s.io/api`, will also modify apimachinery import paths to something like `"k8s.io/api/v12machinery/pkg/runtime"`. To avoid this, explicitly check if the import path to modify is: - the old import path itself - has the prefix "<old-import-path>/"
- Loading branch information