Giter Site home page Giter Site logo

gen's Introduction

What’s this?

gen is a code-generation tool for Go. It’s intended to offer generics-like functionality on your types. Out of the box, it offers offers LINQ/underscore-inspired methods.

It also offers third-party, runtime extensibility via typewriters.

Changelog

Hey, a video

‼️

This project is deprecated. It won't work with recent versions of Go, and...Go now has proper generics! Treat this project as a historical curiosity.

Typewriters

There is a list of open-source typewriters in TYPEWRITERS.md. Please add your own.

Contributing

There are three big parts of gen.

gen

This repository. The gen package is primarily the command-line interface. Most of the work is done by the typewriter package, and individual typewriters.

typewriter

The typewriter package is where most of the parsing, type evaluation and code generation architecture lives.

typewriters

Typewriters are where templates and logic live for generating code. Here’s set, which will make a lovely Set container for your type. Here’s slice, which provides the built-in LINQ-like functionality. Here’s stringer, a fork of Rob Pike’s tool.

Third-party typewriters are added easily by the end user. You publish them as Go packages for import. Learn more...

We’d love to see typewriter packages for things like strongly-typed JSON serialization, Queues, Pools or other containers. Anything “of T” is a candidate for a typewriter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.