views

package
v0.0.0-...-9882766 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LayoutDir = "views/layouts/"

LayoutDir the directory where all the layouts are, defaults to "views/layouts/""

View Source
var TemplateExt = ".html"

TemplateExt defaults to ".html"

Functions

This section is empty.

Types

type View

type View struct {
	Template *template.Template
	Layout   string
}

View the type

func NewView

func NewView(layout string, files ...string) *View

NewView used to create new view with templates attached

func (*View) Render

func (v *View) Render(w http.ResponseWriter, data interface{}) error

Render renders the template

Jump to

Keyboard shortcuts

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