Documentation
¶
Overview ¶
Package template provides utilities to handle templates
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTemplateNotFound = errors.New("template not found") ErrInvalidTemplateFile = errors.New("invalid template file") )
Functions ¶
func NormalizeLocale ¶
NormalizeLocale defensively tries to normalize the locale
it does not necessarily return a valid locale. in this case the default locale will be used anyways
func TemplateFileName ¶
TemplateFileName returns the template file name to use for the given parameters
It looks in the tmplDir directory like so:
tmplDir/locale/baseName
If the file does not exist, it will try
tmplDir/defaultLocale/baseName
If the default does not exist, it will fail.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.