template

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateHandler

type TemplateHandler struct {
	TemplateFile string
	// contains filtered or unexported fields
}

func NewTemplateHandler

func NewTemplateHandler(templateFile string, options ...TemplateHandlerOption) *TemplateHandler

func NewTemplateHandlerFromConfig

func NewTemplateHandlerFromConfig(
	path string,
	t *config.Template,
	options ...TemplateHandlerOption,
) (*TemplateHandler, error)

func (*TemplateHandler) Serve

func (t *TemplateHandler) Serve(server_ *server.Server, path string) error

type TemplateHandlerOption

type TemplateHandlerOption func(handler *TemplateHandler)

func WithAlwaysReload

func WithAlwaysReload(alwaysReload bool) TemplateHandlerOption

func WithAppendRendererOptions

func WithAppendRendererOptions(rendererOptions ...render.RendererOption) TemplateHandlerOption

func WithDefaultFS

func WithDefaultFS(fs fs.FS) TemplateHandlerOption

Jump to

Keyboard shortcuts

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