To run a main or test function at the caret, press &shortcut:ShowIntentionActions; and select the Run intention action.

Run with the intention action

GoLand tips of the day, build 2078