templates

package
v0.0.0-...-101037a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TemplateCacheDuration = 24 * time.Hour

Variables

View Source
var TemplateFS embed.FS

Functions

func GetTemplateContent

func GetTemplateContent(path string) ([]byte, error)

func GetTemplateFiles

func GetTemplateFiles() ([]string, error)

func LoadTemplates

func LoadTemplates(router *gin.Engine) error

func LoadTemplatesFromFS

func LoadTemplatesFromFS(router *gin.Engine, fsys fs.FS) error

Types

type TemplateCache

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

func GetTemplateCache

func GetTemplateCache() *TemplateCache

func (*TemplateCache) Clear

func (tc *TemplateCache) Clear()

func (*TemplateCache) Get

func (tc *TemplateCache) Get(key string) (*template.Template, bool)

func (*TemplateCache) Set

func (tc *TemplateCache) Set(key string, tmpl *template.Template)

Jump to

Keyboard shortcuts

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