The ending statement on the Language spec on section Type parameter declarations, states Type parameters may also be declared by the receiver specification of a method declaration associated with a generic type. <https://go.dev/ref/spec#:~:text=%20type%20parameters%20may%20also%20be%20declared%20by%20the%20receiver%20specification%20of%20a%20method%20declaration%20associated%20with%20a%20generic%20type.%20> Does it mean something like this? type I interface { string | int }
func Double[T I](value T) { fmt.Println(value) } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c5b56ada-cd8e-407e-9493-b34a992380c1n%40googlegroups.com.