Aller au contenu

Broad Wildcard Import (ARCH5192)

Ce contenu n’est pas encore disponible dans votre langue.

Key go.quality.dot-import · Severity warning · Category quality

A dot import drops the package qualifier, hiding where identifiers come from and risking name collisions. Use qualified imports.

import (
. "fmt"
. "strings"
)
func greet(name string) {
Println(ToUpper(name))
}
import (
"fmt"
"strings"
)
func greet(name string) {
fmt.Println(strings.ToUpper(name))
}

Remove the dot import and qualify symbols with their package name.