Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGostruct embedding and promotionSingle-choice MCQ

T embeds *Inner and implements Stringer through it. What does the program do?

type Inner struct{ name string } func (i *Inner) String() string { return i.name } type T struct{ *Inner } func main() { var s fmt.Stringer = T{} fmt.Println(s.String()) }