Skip to content

Instantly share code, notes, and snippets.

@codegangsta
Last active December 29, 2015 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codegangsta/7659232 to your computer and use it in GitHub Desktop.
Save codegangsta/7659232 to your computer and use it in GitHub Desktop.
// folder structure
// - templates/
// - admin/
// - index.tmpl
// - rendering.go
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/render"
)
func main() {
m := martini.Classic()
m.Use(render.Renderer("templates"))
m.Get("/", func(r render.Render) {
r.HTML(200, "admin/index", nil)
})
m.Run()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment