Even if I googled, the solution (GoLand's official help) did not hit easily, so I wrote it. Personally, I sometimes forget about it when I installed GoLand on another PC, which is quite a problem.
Spaces are automatically inserted at the beginning of comments when formatting, which makes it easier.
People who are suffering from being unable to automatically put a space at the beginning of a comment in GoLand.
Here is the official help Let me quote the formula.
- Open the settings window (File | Settings). 2.Editor|Code style|Click Go.
- Click the Other tab.
- Select the checkbox to add leading spaces to the comment.
- In the field, except for the comment space, click the Add button.
- Enter the name of the prefix you want to add as an exception (for example, easyjson).
- Click OK.
This will put a blank line at the beginning of the comment when formatting.
Recommended Posts