Run gofmt After the Builtin Formatter

Ensure that your code is always formatted with gofmt.

Tip Screenshot

To use this feature, check the On code reformat option under Settings/Preferences | Editor | Code Style | Go | Other.

Now you can use the default shortcut, ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux), to trigger the builtin formatter.

You can also search for Run gofmt in the IDE Settings/Preferences, and activate the option as described above.


Related Resources

Improve Code Readability and Navigation
Improve Code Readability and Navigation
Discover how to manage code visibility with code folding in Go
Create a Function in Another Package
Create a Function in Another Package
Type a non-existing function name and generate its implementation in a package of your choice.
Empower your `Printf`-like functions with coding assistance
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions.