Hacker News new | past | comments | ask | show | jobs | submit login
Gorename: easy refactoring tool for Golang (texlution.com)
52 points by vruiz on Nov 21, 2014 | hide | past | favorite | 15 comments



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

http://golang.org/cmd/gofmt/

It allows easy renaming of variables, constants etc.


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.


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


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


It should GoRename. or go-rename. or something that everyone can obviously distinguish it.


I think GoreName should be the canonical pronunciation simply because it's more fun.


Yeah...a dash would do wonders for that


Yup. Took me a moment or two to even realise what its real name was


So how about the objections in https://news.ycombinator.com/item?id=8579893


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.


Now for IDE integration. Please!


Here is a screencast example of using it with Vim: http://quick.as/dgof2p7


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


But then I'd have to use Vim :(


in liteIde press ctrl+shift+r to rename. ctrl+shift+u to find where is used. I don't think it uses gorename though.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: