Part 1 — The language · wrap-up
Cheat sheet & self-check
7 questions across 3 lessons. Each answer links back to the lesson it came from.
Pick an answer to see if you got it, and why.
Q1. Why is Go popular for infrastructure tools like kubectl, Terraform and Prometheus?
Show answer
B. A tool you can copy as one file to any machine, that starts instantly and handles many connections, fits infrastructure work well.
From lesson 01 · Why Go for platform work: toolchain, modules and layoutQ2. What does go.mod record?
Show answer
B. go.mod (with go.sum for checksums) makes builds reproducible; commit both.
From lesson 01 · Why Go for platform work: toolchain, modules and layoutQ3. What is the Go equivalent of a Python dict with a fixed set of keys like {'name': 'n1', 'ready': True}?
Show answer
B. Structs give names and types to fields; the compiler catches typos. Use maps for truly dynamic keys.
From lesson 02 · Go through Bash and Python eyesQ4. What is the zero value of an int, a string, a slice and a pointer?
Show answer
B. Every Go variable has a usable zero value; a nil slice can be appended to and ranged over.
From lesson 02 · Go through Bash and Python eyesQ5. When do you use a pointer receiver (func (s *Server) ...)?
Show answer
B. Value receivers get a copy; pointer receivers modify the original and avoid copying big structs or locks.
From lesson 02 · Go through Bash and Python eyesQ6. What does %w do in fmt.Errorf?
Show answer
B. %v would only copy the text; %w keeps the error chain.
From lesson 03 · Errors done rightQ7. When is panic appropriate?
Show answer
B. Expected failures are returned as errors; panics crash the program (or a goroutine) and are reserved for bugs.
From lesson 03 · Errors done right