{"action":"created","issue":{"url":"https://api.github.com/repos/labstack/echo/issues/21","labels_url":"https://api.github.com/repos/labstack/echo/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/labstack/echo/issues/21/comments","events_url":"https://api.github.com/repos/labstack/echo/issues/21/events","html_url":"https://github.com/labstack/echo/issues/21","id":66285929,"number":21,"title":"support for context.Render","user":{"login":"prabirshrestha","id":287744,"avatar_url":"https://avatars.githubusercontent.com/u/287744?v=3","gravatar_id":"","url":"https://api.github.com/users/prabirshrestha","html_url":"https://github.com/prabirshrestha","followers_url":"https://api.github.com/users/prabirshrestha/followers","following_url":"https://api.github.com/users/prabirshrestha/following{/other_user}","gists_url":"https://api.github.com/users/prabirshrestha/gists{/gist_id}","starred_url":"https://api.github.com/users/prabirshrestha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabirshrestha/subscriptions","organizations_url":"https://api.github.com/users/prabirshrestha/orgs","repos_url":"https://api.github.com/users/prabirshrestha/repos","events_url":"https://api.github.com/users/prabirshrestha/events{/privacy}","received_events_url":"https://api.github.com/users/prabirshrestha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/labstack/echo/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-04T07:23:38Z","updated_at":"2015-04-06T04:24:46Z","closed_at":null,"body":"Would be awesome if there was a `Render` function in context similar to rendering `JSON`.\r\n\r\nHaving this `RendererFunc` interface would allow to use any renderer. Would also be good to have `html/template` as a default Render. This is similar to how `http.Handler and http.HandlerFunc` is implemented.\r\n\r\n```go\r\ntype Renderer interface {\r\n    Render(w http.ResponseWriter, r *http.Request, status int, name string, data interface{})\r\n}\r\n\r\ntype RendererFunc (w http.ResponseWriter, r *http.Request, status int, name string, data interface{})\r\n\r\nfunc (f RendererFunc) Render(w http.ResponseWriter, r *http.Request, status int, name string, data interface{})\r\n```\r\n\r\ngin use `... interface{}` for `data`. Also should we also pass `*http.Request` to `Render` so that it can support content negotiation? If we pass request as `nil` then we can tell the render to not use content negotiation. Not sure if this is too much of magic. I think content negotiation should be a separate topic.\r\n\r\nHere is sample api that could be possible to use. Thoughts?\r\n\r\n```go\r\nvar e := echo.New()\r\ne.Get(\"/\", func (c *e.Context) {\r\n    c.Render(http.StatusOK, \"home\", nil)\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/labstack/echo/issues/comments/89914356","html_url":"https://github.com/labstack/echo/issues/21#issuecomment-89914356","issue_url":"https://api.github.com/repos/labstack/echo/issues/21","id":89914356,"user":{"login":"vishr","id":314036,"avatar_url":"https://avatars.githubusercontent.com/u/314036?v=3","gravatar_id":"","url":"https://api.github.com/users/vishr","html_url":"https://github.com/vishr","followers_url":"https://api.github.com/users/vishr/followers","following_url":"https://api.github.com/users/vishr/following{/other_user}","gists_url":"https://api.github.com/users/vishr/gists{/gist_id}","starred_url":"https://api.github.com/users/vishr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishr/subscriptions","organizations_url":"https://api.github.com/users/vishr/orgs","repos_url":"https://api.github.com/users/vishr/repos","events_url":"https://api.github.com/users/vishr/events{/privacy}","received_events_url":"https://api.github.com/users/vishr/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T04:24:46Z","updated_at":"2015-04-06T04:24:46Z","body":"In the above example it looks like e.RenderFunc is global, wouldn't it be a problem if I want to mix and match different renders?"}}