Idea: Generate function with caller
cmd+n now opens a nice tooltip that enables me to implement an interface quickly. It would be great to see some same kind of functionality, but not to implement an interface, but to create a new method on a struct.
Right now I am using a live template for this, but the autocomplete that happens during the typing of the receiver struct always messes up the flow of the live template. I.e. when I press tab to jump from the receiver part to the function name, the receiver part or anything there is autocompleted instead.
The proposed functionality would open a tooltip, have you select a struct in the current file, press enter, and it pops out
```
func (r *Receiver) $FUNCNAME$() {
}
```
or something similar. Obviously the naming of the receiver var could be made smart.
请先登录再写评论。
Hello, Stephan.
This feature has already been requested (please vote):
https://youtrack.jetbrains.com/issue/GO-4932
Also, in the upcoming 2018.3 version, we have reworked `meth` template a bit, it should be more convenient now:
https://youtrack.jetbrains.com/issue/GO-5746
You can try it out already (using release candidate build) and share with us what you think!
Thanks! Voted. That fix looks like an awesome start, anyway. Already makes things much sweeter :).