fmustache

package module
v0.0.0-...-2384756 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2013 License: MIT Imports: 1 Imported by: 0

README

Fmustache

Mustache template renderer for Forgery.

Install

go get github.com/ricallinson/fmustache

Use

package main

import(
    "github.com/ricallinson/forgery"
    "github.com/ricallinson/fmustache"
)

func init() {
    app := f.CreateServer()
    app.Engine(".html", fmustache.Make())
    app.Get("/", func(req *f.Request, res *f.Response, next func()) {
        res.Render("index.html", map[string]string{"title": "Mu"})
    })
    app.Listen(3000)
}

The above code will look for the file ./views/index.html.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fmustache

type Fmustache struct {
	// contains filtered or unexported fields
}

func Make

func Make() *Fmustache

func (*Fmustache) Render

func (this *Fmustache) Render(f string, o ...interface{}) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL