Unused type parameter
Reports unused type parameters.
func main() {
printAll(
42,
"bird",
)
}
func printAll[I int, S string](
i I,
s string,
) {
fmt.Println(i)
fmt.Println(s)
}
The printAll function has two type parameters I
and S
but uses only the first of them. Therefore, the S string
is grayed out.
Inspection Details | |
---|---|
Available in: | GoLand 2023.3 |
Plugin: | Go, 233.SNAPSHOT |
Last modified: 13 July 2023