| 1 |
rename selected identifier |
| 2 |
|
| 3 |
Usage: |
| 4 |
gopls [flags] rename [rename-flags] <position> <name> |
| 5 |
|
| 6 |
Example: |
| 7 |
|
| 8 |
$ # 1-based location (:line:column or :#position) of the thing to change |
| 9 |
$ gopls rename helper/helper.go:8:6 Foo |
| 10 |
$ gopls rename helper/helper.go:#53 Foo |
| 11 |
|
| 12 |
rename-flags: |
| 13 |
-d,-diff |
| 14 |
display diffs instead of edited file content |
| 15 |
-l,-list |
| 16 |
display names of edited files |
| 17 |
-preserve |
| 18 |
with -write, make copies of original files |
| 19 |
-w,-write |
| 20 |
write edited content to source files |