view

package
v0.0.0-...-699b668 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleView

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

SimpleView implements View interface, but based on golang templates.

func (*SimpleView) Render

func (s *SimpleView) Render(out io.Writer, name string, data interface{}) error

Render executes template named name, passing data as context, the output is written to out.

type View

type View interface {
	Render(out io.Writer, name string, data interface{}) error
}

View is an interface for rendering templates.

func NewSimpleView

func NewSimpleView(viewDir string) (View, error)

NewSimpleView returns a SimpleView with templates loaded from viewDir

Jump to

Keyboard shortcuts

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