templates

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteHTTP

func WriteHTTP(tpl *Template, w http.ResponseWriter, data interface{})

Types

type Engine

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

func Setup

func Setup(o Options) *Engine

func (*Engine) GetTemplate

func (engine *Engine) GetTemplate(path string) (*Template, error)

func (*Engine) PrintInfo

func (engine *Engine) PrintInfo()

func (*Engine) RegisterIndexPartials

func (engine *Engine) RegisterIndexPartials(partials map[string]string) *Template

func (*Engine) WriteIndexHTTP

func (engine *Engine) WriteIndexHTTP(w http.ResponseWriter, data interface{})

type Options

type Options struct {
	TemplatesFS   embed.FS
	IndexFS       embed.FS
	IndexPath     string
	TemplatesPath string
}

type Template

type Template = raymond.Template

func Parse

func Parse(source string) (*Template, error)

Source Files

  • helpers.go
  • templates.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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