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).