views

package
v0.0.0-...-c00e9d6 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Views generates a user interface for the user. Views are created by the data which is collected by the model component but these data aren’t taken directly but through the controller (action). It only interacts with the controller(action).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

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

func Must

func Must(tpl Template, err error) Template

func ParseFS

func ParseFS(fs fs.FS, patterns ...string) (Template, error)

Use ParseFS instead of Parse() so that it embeds the templates(tmpl files) into the final binary. Parse() cannot handle the case of running the app from a different directory due to relative paths of the template files

func (Template) Execute

func (t Template) Execute(w http.ResponseWriter, r *http.Request, data any)

Execute implements actions.Template. receivers

Jump to

Keyboard shortcuts

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