Reformat Code

Tell GoLand to clean up indentation and other code style in your file.

Reformat Code makes it a piece of cake to fix style warnings and make your code formatted like go fmt would.

How to use:

Invoke Reformat Code via ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux).


Related Resources

Improve Code Readability and Navigation
Discover how to manage code visibility with code folding in Go
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
Provide hints and highlights for message formats in custom `Printf`-like functions