Giter Site home page Giter Site logo

sheenobu / typewriter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clipperhouse/typewriter

0.0 2.0 0.0 151 KB

The package underlying gen: type-driven code generation for Go

Home Page: http://clipperhouse.github.io/gen/typewriters/#

License: Other

Go 99.73% Batchfile 0.13% Shell 0.14%

typewriter's Introduction

##What’s this?

Typewriter is a package to enable pluggable, type-driven codegen for Go. The envisioned use case is for generics-like functionality. This package forms the underpinning of gen.

Usage is analogous to how codecs work with Go’s image package, or database drivers in the sql package.

import (
    // main package
	“github.com/clipperhouse/typewriter”
	
	// any number of typewriters 
	_ “github.com/clipperhouse/set”
	_ “github.com/clipperhouse/linkedlist”
)

func main() {
	app, err := typewriter.NewApp(”+gen”)
	if err != nil {
		panic(err)
	}

	app.WriteAll()
}

Individual typewriters register themselves to the “parent” package via their init() functions. Have a look at one of the above typewriters to get an idea.

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.