Go by Example is a static site generator that teaches Go programming through annotated example programs.
The project solves the problem of learning Go by doing: it extracts code snippets and comments from source files, renders them using templates into a static website, and serves the result through any static content delivery system. The approach keeps examples and documentation tightly coupled by storing both in the same source files, ensuring they stay synchronized as the language evolves.
The tool suits anyone building a tutorial or educational site centered on executable code examples. It works best for projects where you want to maintain a single source of truth for both the runnable code and its explanation. The site can be deployed to any static hosting, including cloud storage and CDN services.
The project maintains a stable, minimal codebase with clear contribution guidelines documented in a dedicated file. The examples are designed to work across multiple Go versions, relying on the language's strong backwards compatibility guarantees while noting that some examples demonstrate features from recent releases. The project actively accepts bug reports and pull requests, indicating ongoing engagement with the community around example correctness and completeness.