Registry / web-framework / martini-contrib-render

martini-contrib-render

JSON →
library0.0.0-20150707142108-ec18f8345a11gogounverified

Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.

go get github.com/martini-contrib/render
INSTALL
IMPORT
SIG · MARTINI-CONTRIB-RE
M
martini-contrib-render
web-frameworkgov0.0.0-20150707142108-ec18f8345a11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

render
github.com/martini-contrib/render

Sets up a Martini app with the render middleware and returns JSON.

package main import ( "github.com/go-martini/martini" "github.com/martini-contrib/render" ) func main() { m := martini.Classic() m.Use(render.Renderer()) m.Get("/", func(r render.Render) { r.JSON(200, map[string]string{"hello": "world"}) }) m.Run() }
Debug
Known issues
gotchaMartini is no longer maintained; consider using Gin or Echo instead.
fix
Migrate to a maintained web framework like Gin or Echo.
affects: *
Upgrade
Version history
0.0.0-20150707142108-ec18f8345a11latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources