templates

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default base template suffixes
	BASE_TEMPLATE_SUFFIXES = []string{".tmpl", ".html"}
	// Default directory to look in for base templates
	BASE_TEMPLATE_DIRS = []string{"base"}
	TEMPLATE_DIRS      = []string{"templates"}
	// Functions to add to templates
	DEFAULT_FUNCS = make(template.FuncMap)
	// Template file system
	TEMPLATEFS fs.FS
)
View Source
var USE_TEMPLATE_CACHE = true

Functions

func FilenameFromPath

func FilenameFromPath(p string) string

func GetTemplate

func GetTemplate(templateName string) (*template.Template, string, error)

func NicePath

func NicePath(forceSuffixSlash bool, p ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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