Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
Design patterns in Go interview questions test whether you apply Go idioms or translate patterns from Java/Python without adaptation. This module covers the functional options pattern (the idiomatic Go alternative to the builder pattern and telescoping constructors — func WithTimeout(d time.Duration) Option), the middleware chain pattern (the http.Handler wrapping pattern that underpins every Go web framework), the repository pattern in Go (defining a storage interface, providing a PostgreSQL implementation, injecting a mock in tests), dependency injection without a framework (constructor injection using interfaces — Go favours small interfaces over DI containers), the observer pattern using channels (event streams without callbacks), and sync.Once as the Go singleton idiom. The SOLID principles are covered through Go examples: the 'I' in SOLID (interface segregation — why Go's small-interface philosophy is a direct expression of ISP) and the 'D' (dependency inversion — program to interfaces, not concrete types).
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.