This is a video demo, how to use different refactoring feature in GoLand to speed up you productivity when doing refactor.
Original example is from "extract variable" section of refactoring 2/e.
Rewriting it with golang.
- magic number
- comments don't match code behavior
- extract variable(ctrl+alt+v)/ extract const(ctrl+alt+c)
- extract method(ctrl+alt+m)
- inline variable(ctrl+alt+n)
- move method to struct(manual)
- move struct and receiver functions(F6)
more useful features in GoLand: top 25 editing features of goland