Re:Go runtime: 4 years later
by apatheticonion on Wednesday September 28, 2022 @05:12AM
(#33005979)
It's more this scenario https://go.dev/play/p/S2yQqriYTtm
It's because an interface is structurally evaluated only on variable assignment, but it's not always structurally evaluated which limits its usefulness
Possibly I'm misunderstanding the complaint, but that is because an interface is a fat pointer, so one returns a pointer to a struct implementing the interface.
https://go.dev/play/p/YOa6NF7rjPF