

Gorename: easy refactoring tool for Golang - vruiz
https://texlution.com/post/gorename/

======
lazyjones
Note that Go comes with a powerful refactoring tool "out of the box":

[http://golang.org/cmd/gofmt/](http://golang.org/cmd/gofmt/)

It allows easy renaming of variables, constants etc.

~~~
pjmlp
Does it also extract methods, convert fields into accessors, move code between
packages while updating import statements, update comments that relate to
code, move methods across types?

Renaming is only Refactoring 101.

------
tmrmn
at first i've read it as 'gore-name'... not the nicest thing

~~~
scarboy
It's no expertsexchange. I wouldn't bother changing it.

------
Dylan16807
So how about the objections in
[https://news.ycombinator.com/item?id=8579893](https://news.ycombinator.com/item?id=8579893)

~~~
AYBABTME
This person is just wrong. It's not because the tools weren't there or the
commenter was unaware of how they work, that Go is bad at refactoring. It's
very easy to write correct, type safe refactoring tools on Go code.

------
nl
Now for IDE integration. Please!

~~~
jdfellow
vim-go integrates with it already. Put your cursor on a name, type :GoRename,
et voila all other instances across your project are updated.

~~~
nl
But then I'd have to use Vim :(

