Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegistryToContext ¶
RegistryToContext ...
func SetGlobalRegistry ¶
func SetGlobalRegistry(registry Registry)
Types ¶
type Registry ¶
type Registry interface {
// MustGetErrorTemplate return error template by code. Panic if not found template by code or locale
MustGetErrorTemplate(code string, locale string) *template.Template
// GetErrorTemplate return error template by code
GetErrorTemplate(code string, locale string) (*template.Template, error)
// DefaultLocale return default locale
DefaultLocale() string
// SetDefaultLocale set default locale
SetDefaultLocale(locale string)
RegisterTemplate(code string, locale string, template *template.Template)
RegisterLocale(locale locale)
}
Registry ...
func GlobalRegistry ¶
func GlobalRegistry() Registry
func NewDefaultRegistry ¶
func NewDefaultRegistry() Registry
Click to show internal directories.
Click to hide internal directories.