Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
Go interfaces are the most interview-tested aspect of the type system, and they work unlike interfaces in Java or Python. This module covers implicit interface satisfaction (you never declare 'implements'), interface composition (embedding one interface in another), struct embedding as Go's answer to inheritance (promoted fields and methods, the method set rules), the empty interface interface{} and its modern alias any — when to use it and when it signals a design smell. The Stringer and error interfaces are the two every Go developer implements, and both are covered in depth. The famous interface nil pitfall (a non-nil interface value wrapping a nil pointer) trips up experienced developers in interviews and in production; it is explained with a runnable example and the canonical fix. Every answer distinguishes Go composition from classical inheritance.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.