GoLand
 
2023.2
Get GoLand

Auto import

Last modified: 23 August 2023

If you use a type, an interface, a method, or a function that you haven't imported yet, the IDE shows you a tooltip prompting to add a missing import statement so that you don't have to add it manually. Press AltEnter to accept the suggestion.

If there's more than one possible source of import, pressing AltEnter will open the list of suggestions.

https://resources.jetbrains.com.cn/help/img/idea/2023.2/go_auto_import.png
Gif