https://gotipplay.golang.org/p/ojY3RRJRJgy
func GenericData[T DATA, T1 any]() { } When DATA is interface of pointer type, so methods can modify the underlying structure... // T1 <- any type, so can instantiate but can't increment as there's no interface var tt T1 fmt.Println(tt) var d T // T <- DATA interface type, so can't initialize but can instantiate can't instantiate because the object will never initialize (nil) Can i create new object of type DATA somehow? -- 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/a5f33c45-c41f-47f6-98db-314716b70c3bn%40googlegroups.com.