How to Future-proof your Go API
summary
Claims a migration-based approach keeps the public contract stable while minimizing ongoing coding. Uses Go stdlib HTTP, httptest and the HTTP dump, plus Go interfaces and testing hooks to assert whole responses rather than individual fields. Ships two tools: abide snapshotting to record and detect interface regressions and pinned version migrations to apply incremental transforms to resources. Both integrate with go test, catch unexpected changes, and serve as versioned documentation so regressions are observable and actionable.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:13windmill
- 3:19Future-Proof Application Programming Interface
- 4:03Future-Proof Application Programming - Less maintenance
- 4:24Why Go? Standard library (net/http, testing) Type + Interfaces Go Community + API Frameworks
- 14:48pinned type Version type Change type Versionable interface
- 18:18Versioning - Summary Use 'Interface to support any object = Integrate into testing for observability
related talks
26mEvolving Your API
34mAdvanced Testing Techniques in Go
22mHigh(er) Reliability Software Patterns for Go
35mDeveloping a Go API client: the do's and don'ts
27mHow to Avoid Breaking Changes in your Go Modules
33mTransition to Go 2
35mBuilding Your API for Longevity
32mSecure and reliable development with Go
