How can I automatically create/insert functions above the current function?

Hello everyone, 

I hope you all are having a great time.

I am trying to figure out a QoL setting that will help me a lot. In Jetbrains IDEs, you can enter a function name, then click alt+enter on the function name, then select `Create function` to automatically create it in current class, file, etc. such as the following:

 

Now when I click this “Create function ‘testing’” it will create the `testing` function below the current function. As shown below:

 

Is there a way to change this behavior and create this `testing` function above the current function, in this case `Main`?

Thanks in advance!

1
2 comments
Hi there,

Thanks for your feedback! Currently, there isn't an option to choose the placement of the newly created function in GoLand. However, I've gone ahead and created a feature request to add this functionality. You can check it out here: https://youtrack.jetbrains.com/issue/GO-18562.

Feel free to add any comments or suggestions, and if you'd like to stay updated on the progress of this feature, you can subscribe to it by clicking the star icon.
0

Thank you, I will keep an eye on that. 

0

Please sign in to leave a comment.