templates

package
v0.0.0-...-0f775b8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package templates provides a set of template functions for use in Go templates.

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{
	"firstLetter": func(s string) string {
		r, size := utf8.DecodeRuneInString(s)
		if size == 0 {
			return "x"
		}

		return strings.ToLower(string(r))
	},
	"title": func(s string) string {
		return cases.Title(language.English).String(s)
	},
}

FuncMap provides a set of template functions for use in Go templates.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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