del

package
v0.0.0-...-b97fd3c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: MIT Imports: 3 Imported by: 0

README

del

A wrapper around the render package to make it work with echo.

Installation

$ go get https://github.com/markbates/going/del

Usage

e := echo.New()

e.SetRenderer(del.New(del.DefaultOptions))

e.Get("/", func(c *echo.Context) error {
  return c.Render(200, "a/b", "Mark")
})

e.Run(":9000")

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = render.Options{
	Directory:       "templates",
	Layout:          "application",
	Extensions:      []string{".tmpl", ".html"},
	Charset:         "UTF-8",
	IndentJSON:      true,
	IndentXML:       true,
	PrefixXML:       []byte("<?xml version='1.0' encoding='UTF-8'?>"),
	HTMLContentType: "application/xhtml+xml",
	IsDevelopment:   true,
	UnEscapeHTML:    true,
	StreamingJSON:   true,
}

Functions

This section is empty.

Types

type Templates

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

func New

func New(opts render.Options) *Templates

Render(w io.Writer, name string, data interface{}) error

func (*Templates) Render

func (t *Templates) Render(w io.Writer, name string, data interface{}) error

Jump to

Keyboard shortcuts

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