Skip to content

x/tools/cmd/gorename: tag and delete it #69360

@adonovan

Description

@adonovan

The cmd/gorename tool long predates the LSP and gopls, and its functionality has since been subsumed by them. We should deprecate and delete the command, following the sequence used for go/pointer in #59676.

Example of using gopls as a batch renaming tool:

$ cat a.go
package main

func main() {
	f()
}

func f() {}

$ gopls rename -write ./a.go:#42 g

$ cat a.go
package main

func main() {
	g()
}

func g() {}

gopls doesn't support the symbolic command-line syntax for choosing the symbol to rename:

I wonder how many people actually use it, instead of specifying the symbol by position (e.g. byte offset 42 in the example above).

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Accepted

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions