Building Better Packages
summary
Argues for designing packages by specifying clear interfaces and returning concrete structs, with the concrete rule of thumb that inputs are interfaces and return values are structs. Names and demos include Negroni as a tiny workable middleware chain, idioms from net/http, io.Writer and http.FileSystem, and bufio’s NewWriter pattern. Claims three pillars — simplicity, flexibility, continuity — and shows these yield durable, testable packages that integrate with Gorilla mux and the standard library.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:29BUILDING BETTER PACKAGES
- 3:04IMPLEMENTATION INTERFACE
- 3:34SIMPLICITY FLEXIBILITY CONTINUITY
- 3:58SIMPLICITY IS PREREQUISITE FOR RELIABILITY
- 5:00ONE DIMENSION
- 5:29SWISS ARMY KNIFES
- 6:20WHAT DOES IT MEAN?
- 6:42WHAT DOES IT ACCOMPLISH?
- 10:12ALWAYS USE INTERFACES
- 10:36COMMITMENT
- 11:18RETURN VALUE? STRUCT
- 11:41ARGUMENT VALUE? INTERFACE
- 17:59NEED EXAMPLES?








