While I mentioned in a previous post that I started learning golang, it has been almost a year since I started learning. I have also posted about basic performance testing using golang, but this time, I thought it might be nice to post about some IDE tips. If you want some simple tips to help speed up development, then keep on reading.
1. Implement Interface
Implement Interface is a hidden gem that can be found by using the common Intellij keystroke combo ⌥ (Option/Alt) + Enter on the struct that you wish to implement the interface. This will open a search window, and you can type the interface that you wish to implement.
Press enter or click to view image in full size
2. Extract Interface
I wish this had a great keyboard combination, but it doesn’t currently by default. If you wish to extract an interface, then you need to Right-Click on struct → Refactor → Extract → Interface. Once the menu pops up it asks you more information, name, file to add to, package…etc. I still use this quite often.
Press enter or click to view image in full size