html

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

func NewCollection

func NewCollection(entries ...Template) *Collection

func (Collection) Clone

func (c Collection) Clone() (c2 Collection, err error)

func (Collection) Funcs

func (c Collection) Funcs(funcs template.FuncMap) Collection

FuncMap

func (Collection) Parse

func (c Collection) Parse() error

Parse

func (Collection) Template

func (c Collection) Template(name string) (*template.Template, error)

Access

func (Collection) View

func (c Collection) View(name string, data interface{}) (v View, err error)

Access

type Template

type Template struct {
	Name string
	Blob *file.Blob
}

Temporary wrapper

func NewTemplate

func NewTemplate(name string, blob *file.Blob) Template

type View

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

github.com/go-chi/render.Renderer

func (View) Name

func (t View) Name() string

html/template

func (View) Render

func (t View) Render(w http.ResponseWriter, _ *http.Request) error

func (View) Template

func (t View) Template() *template.Template

Jump to

Keyboard shortcuts

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