Go is a general-purpose compiled language created by Google engineers including Rob Pike and Ken Thompson. It emphasizes readability, fast toolchains, and practical concurrency for networked systems.
Core characteristics
- Static typing — types checked at compile time; inference with
:=in many cases - Garbage collected — unlike Rust, Go uses a concurrent GC—simpler memory model, some latency trade-offs
- Goroutines — lightweight threads scheduled by the Go runtime, not OS threads per task
- Rich standard library — HTTP, JSON, crypto, testing without third-party deps for many tasks
Typical build-run flow (local)
- Write
main.gowithpackage mainandfunc main() go run .orgo build -o appthen./app- Deploy a single static binary—no separate runtime install on the server
Important interview questions and answers
- Q: Is Go garbage collected?
A: Yes—the runtime manages heap memory; you still reason about pointers and slice backing arrays. - Q: Who uses Go in production?
A: Cloud platforms (Kubernetes, Docker, Terraform), fintech APIs, observability tools, and many microservice backends. - Q: Go vs Python for a script?
A: Python wins rapid prototyping; Go wins typed deployment, performance, and single-binary distribution.
Self-check
- What file extension do Go source files use?
- Name one major open-source project written in Go.
Tip: Go source uses .go files compiled to static binaries—think single deployable artifact, not a JVM or interpreter on the server.
Interview prep
- Is Go garbage collected?
Yes—the runtime manages heap memory with a concurrent GC; you still reason about pointers, slices, and shared state under concurrency.
- Who uses Go in production?
Google, Docker, Kubernetes, HashiCorp (Terraform), many fintech and observability companies, and cloud-native microservice teams.