Optimize Imports

Automate the organizing and cleaning up of your Go imports with Optimize Imports.

Optimize Imports helps you deal with unsorted imports and unused imports.

How to use:

Optimize Imports is enabled by default in Reformat Code.

You can invoke it manually 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