Stdle #157 · classes · 2026-11-10
What does this Go snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
package main import "fmt" type Base struct{} func (Base) Name() string { return "base" } type Child struct{ Base } func (Child) Name() string { return "child" } func main() { c := Child{} fmt.Println(c.Name(), c.Base.Name())}Classes