Skip to content

affected/package: cmd/go allow renaming a module without replacing all import paths #59766

@krasi-georgiev

Description

@krasi-georgiev
$ go version
go version go1.20.2 linux/arm64

What did you do?

trying to rename a module without replacing the import paths
this is a huge project and a global search and replace is not feasible.

What did you expect to see?

to be able to use replace directive
replace github.com/repo/name => github.com/repo-new/name-new

when the module name is github.com/repo-new/name-new and it has the replace directive above it should just use its own packages and shouldn't require a version

What did you see instead?

replacement module without version must be directory path (rooted or starting with ./ or ../)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions