Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGointerface representation iface itabSingle-choice MCQ

Consider this code. What is printed, and what does it reveal about how itab method dispatch interacts with pointer vs value receivers?

type Speaker interface{ Speak() string } type T struct{} func (t *T) Speak() string { return "hello" } func main() { var t T var s Speaker = t fmt.Println(s.Speak()) }