Skip to content

Commit 13ff221

Browse files
ericchiangstamblerre
authored andcommitted
internal/lsp/cmd: include new name in rename help message
"gopls rename" appears to require a new name as a positional argument but the command line help message doesn't include it. Update the help message. Change-Id: Iea769d2095b0642ebbacce128da336ec0dc56828 Reviewed-on: https://go-review.googlesource.com/c/tools/+/280472 Reviewed-by: Rebecca Stambler <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Trust: Rebecca Stambler <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 0f6027f commit 13ff221

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/lsp/cmd/rename.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ type rename struct {
3131
}
3232

3333
func (r *rename) Name() string { return "rename" }
34-
func (r *rename) Usage() string { return "<position>" }
34+
func (r *rename) Usage() string { return "<position> <new name>" }
3535
func (r *rename) ShortHelp() string { return "rename selected identifier" }
3636
func (r *rename) DetailedHelp(f *flag.FlagSet) {
3737
fmt.Fprint(f.Output(), `
3838
Example:
3939
4040
$ # 1-based location (:line:column or :#position) of the thing to change
41-
$ gopls rename helper/helper.go:8:6
42-
$ gopls rename helper/helper.go:#53
41+
$ gopls rename helper/helper.go:8:6 Foo
42+
$ gopls rename helper/helper.go:#53 Foo
4343
4444
gopls rename flags are:
4545
`)

0 commit comments

Comments
 (0)