package bingo

import "stathat.com/c/bingo"

Install: go get stathat.com/c/bingo

The bingo package is a helper package to make writing web applications in Go with net/http easier.

It adds the ability to handle http requests with context handling functions that include before and after request functions and sessions.

It has a template pool using spitz.

Usage

Register templates:

err := bingo.Register("landing/index")

Register layouts:

bingo.RegisterLayout("admin", "layouts/admin_header", "layouts/admin_footer")

Wrap http request, response in contexts:

bingo.HandleContext("/", landing.Handler, contexts.GuestContextMaker)

And a context handler:

package landing

func Handler(c bingo.Context) *bingo.AppError {
        data := c.ResultData("Invent stats on the fly")
        return bingo.Render("landing", "landing/index", data, c)
}

We'll release an example bingo web application soon. Until then, you'll have to read the code to figure out what else it can do...