Skip to content

x/tools/gopls: change the module path and upgrade imports within the module #41471

Closed as not planned
@godcong

Description

@godcong

What version of Go are you using (go version)?

$ go version
go version go1.14.7 windows/amd64
 

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
//Has nothing to do with env

What did you do?

Now I usually modify the go.mod file.
Then modify some imports one by one.

What did you expect to see?

Sometimes a project may permanently move to a new address.
I hope go mod has any way to directly migrate my project to the new address.
Possible comannd like:

//I created a new project,use:
go mod init github.com/nameA/projectA

//When I need to migrate to a new address like nameB/projectB, to use:
go mod change github.com/nameA/projectA github.com/nameB/projectB 

Then all the imports of the project point to the new address.

What did you see instead?

Now I don't seem to see a similar function.
If there is no such feature, I hope it can be added.
If there is already have a similar functions, I hope to get some help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions