Can extract constant be put into the "consts" vs. in line?


I am using extract constant (alt+ctl+c) in my code to extract a constant from a literal quote. It works fine but it creates the constant in line.  We have standards to keep all our constants at the top of the file in the "consts" clause.   Is there an option to have this happen automatically so that I don't need to then cut/paste the newly created constant from the depths of my code to the "consts" part?

Official comment

Hey Jayson,

It is not available in GoLand yet, but we have a feature request to add it: GO-8257.

Feel free to follow it.

A really good post, The solution worked for me thanks to the community and the members for the solution.


Please sign in to leave a comment.