Go Developer track
Go (Golang) interview questions and answers
Go interviews test goroutines, channels, interfaces and error handling. Then you solve a coding problem. Practice both with follow-ups.
Questions
Interview questions and answers.
Real questions from this track, from easier to harder, with what a good answer covers. In the mock interview, each one comes with follow-ups based on what you say.
How does Go handle errors?
A good answer covers that functions return an error value that the caller checks.
What is the difference between an array and a slice in Go?
A good answer covers that an array has a fixed size that is part of its type.
What is a goroutine?
A good answer covers that a goroutine is a function running at the same time as others, started with go.
How do interfaces work in Go?
A good answer covers that a type satisfies an interface just by having its methods, with no implements keyword.
What does defer do?
A good answer covers that defer runs a call when the surrounding function returns.
How do maps work in Go?
A good answer covers that a map links keys to values and finds a key quickly.
What are channels in Go?
A good answer covers that a channel passes values between goroutines safely.
How do structs and methods work in Go?
A good answer covers that a struct groups fields and methods are functions with a receiver.
How do you write tests in Go?
A good answer covers that tests are functions named TestXxx in _test.go files, run with go test.
How does JSON encoding work in Go?
A good answer covers that encoding/json uses exported fields and struct tags to name keys.
How do Go modules manage dependencies?
A good answer covers that go.mod lists the module path and the versions it needs.
What is context.Context for?
A good answer covers that a context carries cancellation and deadlines through a chain of calls.
How does select work, and what is it used for?
A good answer covers that select waits on several channel operations and runs the first one ready.
When do you use a mutex instead of a channel?
A good answer covers that a mutex protects shared state that several goroutines read and write.
Why can an interface holding a nil pointer not equal nil?
A good answer covers that an interface value has a type and a value inside it.
When do generics help in Go?
A good answer covers that type parameters let one function work over many types, like a Map over slices.
How does the Go scheduler run goroutines?
A good answer covers that many goroutines run on a few OS threads, set by GOMAXPROCS.
How do you find out why a Go service is slow?
A good answer covers that pprof gives CPU, memory, goroutine and block profiles.
How do you structure a Go service?
A good answer covers that packages are named for what they provide, not util or common.
What causes goroutine leaks, and how do you find them?
A good answer covers that a goroutine blocked forever on a channel or I/O never ends and holds its memory.
How does Go's garbage collector work, and how do you reduce its cost?
A good answer covers that it runs alongside the program with short pauses, triggered by heap growth.
How would you build a worker pool in Go?
A good answer covers that a fixed number of goroutines read jobs from one channel.
What do you need to get right with net/http in production?
A good answer covers that the default client has no timeout, so one must be set.
How would a Go service stay healthy when traffic is more than it can handle?
A good answer covers that limits on goroutines, queues and connections keep memory bounded.
What would you measure and log in a Go service in production?
A good answer covers that request metrics, plus goroutine count, heap and GC pauses, show health.
How would you design a Go package other teams will import?
A good answer covers that the exported API is small, with options structs or functional options for settings.
A Go service crashes now and then with 'concurrent map writes'. How do you track it down and stop it coming back?
A good answer covers that the panic's stack trace shows which map and which goroutines.
A hot Go handler allocates too much. How do you cut it?
A good answer covers that escape analysis shows which values move to the heap.
How would you run Go well across many teams and services?
A good answer covers that a service template gives logging, metrics, config and graceful shutdown.
When is Go the right language for a new system, and when is it not?
A good answer covers that Go fits network services and tools that need simple concurrency and fast builds.
How would you make a fleet of Go services reliable?
A good answer covers that every outbound call has a timeout, a retry policy and a limit.
How would you design concurrency in a large Go system so it stays understandable?
A good answer covers that each goroutine has a clear owner and a clear way to stop.
What it covers
Topics.
How it works
How the mock interview runs.
Concept questions that start simple and get harder.
Follow-ups on every answer, so you explain the why.
One coding challenge in a live editor.
Your report scores technical correctness, problem-solving & tradeoffs, communication clarity, with quotes from your answers as proof.
Questions.
What Go questions come up most?
Goroutines and channels come up the most. You may also get the select statement, interfaces, and slices versus arrays. Expect a question on errors, and on data races when two goroutines touch the same data.
How does an Orin mock interview work?
You talk with Orin by voice, like a video call. It asks questions, listens and asks follow-ups based on what you said. Coding happens in a live editor and design on a live whiteboard. After the interview you get a report with quotes from your answers, what cost you points and what to practice next.
Is it free?
Your first interview is free: a 15-minute round with a short coding exercise. No card needed.
Practice the real thing.
A go developer mock interview by voice, with follow-ups and feedback you can use. First interview free.
Start free interview