A software library is reusable code packaged for incorporation into another program. You import it rather than open it, run it, or pipe data through it. Its customer is a developer seeking to avoid rewriting recurring boilerplate. section 5.2
Read a library as a product with a customer, a painful alternative, and a promise. The public API—its exported functions and types—and the README usually reveal that intent more clearly than internal implementation details. section 5.2
Example: a date library
A date library may bet that timezone mathematics is painful enough for developers to replace the language's standard library. Its core types and structs form the library's schema: stable names and types on which other code depends. section 5.2 section 7.2
Figure 5.3 You open a web app, import a library, run a CLI, or pipe data through a tool. Each interface reveals the specific customer the codebase is built to win.

Use the interface comparison to distinguish importing a library from opening, running, or piping through other codebase types. section 5.2


