render

package
v0.0.0-...-71a9ee9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

render is a elsa middleware for render

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Prefix    string `long:"render_refix"  default:"/"             description:"URL prefix to handle"`
	Ext       string `long:"render_ext"    default:".tmpl"         description:"Template extention"`
	Templates string `long:"render_path"   default:"templates/render" description:"Dir where templates are"`
}

Flags defines local application flags

type Middleware

type Middleware struct {
	Log    *log.Logger
	Config *Flags
	Tree   *dirtree.Tree
	Engine *render.Render
}

Middleware is a struct that has a ServeHTTP method

func New

func New(logger *log.Logger, cfg *Flags, show404 bool) *Middleware

func (*Middleware) ServeHTTP

func (mw *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

The middleware handler

Jump to

Keyboard shortcuts

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