funcmap

package
v0.0.0-...-df959dd Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CacheBuster stores a random string used as a cache buster for static files.
	CacheBuster = random.String(10)
)

Functions

func File

func File(filepath string) string

File appends a cache buster to a given filepath so it can remain cached until the app is restarted

func GetFuncMap

func GetFuncMap() template.FuncMap

GetFuncMap provides a template function map

func HasField

func HasField(v any, name string) bool

HasField checks if an interface contains a given field

func Link(url, text, currentPath string, classes ...string) template.HTML

Link outputs HTML for a link element, providing the ability to dynamically set the active class

Types

This section is empty.

Jump to

Keyboard shortcuts

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