iph/catan — pull request #32 by iph (2014-01-09 22:59:19+00:00)
Title: Cleaner Response Handlers and Util

Big update. Removed a lot of boilerplate code in favor of a clojure function that generates a handler instead.

If you look in detail, it goes like this now:

```http.HandleFunc("/some/url", HandlerGenerator(NewUserFunc)```

and params into these functions are:
```func NewUserFunc(r *http.Request, db mgo.Database) (Response)```

So the new way to create handlers would be as follows:

```func NewUserFunc(r *http.Request, db mgo.Database) (Response){
// Pull request data
var name := r.FormValue("name")

// Do something with request data.
fmt.Printf("HOLY SHIT I GOT DATA\n")

// Return response to write to client in a json object
return Response{"herp":"derp", "burp":"flurp"}
}```

Thoughts? Discussion? @delorenzo @Zaxcoding