template

package
v0.0.0-...-a84335b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package template provides a templating engine for presenting the ui.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine contains the constructed state of a template.Template.

func NewEngine

func NewEngine(router *mux.Router) *Engine

NewEngine returns a default template engine.

func (*Engine) Compile

func (e *Engine) Compile() error

Compile parses templates from the embedded filesystem and prepares them for rendering.

func (*Engine) Render

func (e *Engine) Render(name string, data map[string]interface{}) []byte

Render returns the contents of the named compiled template.

Jump to

Keyboard shortcuts

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