gen Go
Type-driven code generation for Go
...It uses type annotations to add “of T” functionality to your packages. gen generates code for your types, at development time, using the command line. It is not an import; the generated source becomes part of your package and takes no external dependencies. Typewriters are where templates and logic live for generating code. Here’s set, which will make a lovely Set container for your type. Third-party typewriters are added easily by the end user. You publish them as Go packages for import. This repository. The gen package is primarily the command-line interface. Most of the work is done by the typewriter package, and individual typewriters.