rcrowley / go-tigertonic

A Go framework for building JSON web services inspired by Dropwizard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bugs in README

tv42 opened this issue · comments

commented

The examples in README look wrong.

func myHandler(u *url.URL, h http.Header, *MyRequest) (int, http.Header, *MyResponse, error) {
..

mux.Handle("GET", "/stuff", tigertonic.Marshaled(tigertonic.Timed(myHandler, "myHandler", nil)))

surely that should be Timed(Marshaled(myHandler, "myHandler", nil))
as myHandler is not a http.Handler.

It actually should be tigertonic.Timed(tigertonic.Marshaled(myHandler), "myHandler", nil). Good catch!