I understand what’s happening, but I can’t yet understand why it’s done this way? var i I = T{"hello"}
Why would pass the variable i transitionally through the interface type?
Afterall, it seems you get the same resulting type (main.T) regardless.
It makes more sense to me to just: i := T{"Hello"}
What am I missing logically here? I’m just trying to understand.
var i I = T{"hello"}//type I
i := T{"Hello"}//type T
Edit:
The key here is show the interface can contain any type that fit the interface. If you don’t need the interface you just create variable single type.