Production Ready "Hello, World!"
summary
Implements a production-ready ping endpoint in Go using only the standard library, adding separate main/run for testability, graceful shutdown via signal trapping, runtime and build-time version injection, and flag-based configuration instead of hardcoded ports. Replaces the default mux with a custom http.Server and handler constructor, enforces JSON content-type and proper status codes, adds logging and clearer error responses, drives development with table-driven tests and measures coverage, and recommends health/debug endpoints and anti-corruption/strangler strategies when refactoring legacy systems.
AI-written summary · about
chapters (19)
- 0:00Production readiness intro
- 2:29Coding katas importance
- 4:12Hello World kata explained
- 6:00Production readiness criteria
- 10:13Go Hello World start
- 11:35Adding tests to service
- 12:41Separate main and run
- 15:14Graceful shutdown signals
- 16:41Runtime and build info
- 19:54Dynamic config
- 21:39Custom HTTP server
- 24:11Proper JSON response
- 27:08Content type handling
- 31:05Test coverage improvement
- 32:53Service package refactor
- 33:37When to stop polishing
- 35:02Katas in AI era
- 35:46Estimating work
- 36:28Q&A
related talks
40mProduction Go Service Essentials
28mWriting and Debugging a Web-Based Multi-Player Game
34mAdvanced Testing Techniques in Go
04mMocking in Go: Using interfaces for fun and profits
17mConceptualizing Large Software Systems
37mBest Practices for Industrial Programming
23mBuilding Gophercises
31mGo tricks from the trenches
