Concurrency
- Goroutines versus OS threads - cheap, multiplexed onto threads by the runtime.
- Unbuffered versus buffered channels, and what blocks in each case.
- `select` with a default, and how you implement a timeout.
- How do you stop a goroutine? Context cancellation - and the point that there is no kill.
- What is a goroutine leak, and how would you notice one in production?
- `sync.WaitGroup` versus a done channel, and when a mutex is simply the better tool than a channel.
The traps
- The nil interface trap. A nil pointer stored in an interface makes the interface non-nil. This is the classic Go gotcha and it appears constantly.
- Slices share backing arrays. `append` may or may not allocate, so a slice of a slice can mutate the original. Expect code that demonstrates it.
- Loop variable capture in goroutines - and how recent Go versions changed the semantics.
- Map iteration order is randomised, deliberately.
- Deferred calls run LIFO, arguments evaluate immediately, and `defer` in a loop is a resource leak.
Interfaces and design
- Interfaces are satisfied implicitly - what that changes about how you design packages.
- Why small interfaces, defined by the consumer rather than the producer?
- Embedding versus inheritance.
- When would you use a pointer receiver over a value receiver?
Errors and tooling
Error handling philosophy - errors as values, wrapping with `%w`, `errors.Is` and `errors.As`, and a defensible opinion on the verbosity. Then the tooling questions: the race detector, `go test` with benchmarks, and profiling with pprof. Infrastructure-adjacent roles often pair this with DevOps interview questions.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and honesty about what you have not done reads better than bluffing.
- Mid-level: the same ground, plus a service or tool you have written. Expect follow-ups asking why you made a particular choice rather than whether you know the syntax.
- Senior: a concurrency bug you found with the race detector, and a profiling session that changed something. At this level the language questions get shorter and the judgement questions get longer.
Whatever the level, the reliable way to prepare is to say your answers out loud rather than reading them. Most of what candidates lose in a Go interview is lost in the gap between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common Go interview questions?
Goroutines and channels, `select` with timeouts, stopping work with context cancellation, the nil interface trap, slices sharing backing arrays, and error wrapping with `errors.Is` and `errors.As`.
What is the nil interface trap in Go?
Storing a nil pointer inside an interface produces an interface value that is not nil, because the interface holds a type as well as a value. A check for `err != nil` can therefore succeed when the underlying pointer is nil - it is the most frequently asked Go gotcha.
When should you use a mutex instead of a channel in Go?
When you are protecting shared state rather than coordinating handoffs - a counter, a cache or a map guarded by `sync.Mutex` is simpler and faster than routing access through a channel. Saying this shows judgement beyond the share-memory-by-communicating slogan.
How do you stop a goroutine?
You cannot kill one; you signal it to return, conventionally through context cancellation or a done channel, and the goroutine must check for that signal. Goroutines that never receive or honour a signal are the usual source of leaks.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free