Redundant import alias
Reports aliases of imported packages that may be omitted.
Usually, such aliases equal to the names of the imported packages, so aliases have no effect and one can use package names directly.
Example:
import fmt "fmt"
The fmt
alias duplicates the package name that is also named "fmt"
. To delete the alias, use the Delete import alias quick-fix.
After the quick-fix is applied:
import "fmt"
Inspection Details | |
---|---|
Available in: | GoLand 2023.3 |
Plugin: | Go, 233.SNAPSHOT |
Last modified: 13 July 2023