go-martini / martini

Classy web framework for Go

Home Page:martini.codegangsta.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typecheck arguments on boot-up

ORESoftware opened this issue · comments

So we have this:

m.Get("/cp/users/subresource/email", common.AsJson, common.RequestTimer, ctr.CreateEmail)

could we not tell martini to type check the arguments to make sure all types are represented, perhaps by returning the type of each argument from:

common.AsJson, common.RequestTimer,

furthermore if there are two many arguments to ctr.CreateEmail it could also barf on load?