Skip to content
Snippets Groups Projects
Commit 355c0038 authored by Semyon Krestyaninov's avatar Semyon Krestyaninov :dog2:
Browse files

fix

parent ca8ad03a
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ func (b *Builder) getFuncs() template.FuncMap { ...@@ -60,7 +60,7 @@ func (b *Builder) getFuncs() template.FuncMap {
return template.FuncMap{ return template.FuncMap{
"lookup": getLookup(b), "lookup": getLookup(b),
"system": getSystem(b), "system": getSystem(b),
"error": getErrorFunc(b), "error": setErrorFunc(b),
} }
} }
......
...@@ -44,9 +44,9 @@ func getSystem(b *Builder) any { ...@@ -44,9 +44,9 @@ func getSystem(b *Builder) any {
} }
} }
// getErrorFunc возвращает функцию, которая устанавливает сообщение об ошибке с заданным текстом. // setErrorFunc возвращает функцию, которая устанавливает сообщение об ошибке с заданным текстом.
// Текст ошибки можно использовать в других шаблонах с помощью конструкции {{ .Error }}. // Текст ошибки можно использовать в других шаблонах с помощью конструкции {{ .Error }}.
func getErrorFunc(b *Builder) func(string) (string, error) { func setErrorFunc(b *Builder) func(string) (string, error) {
return func(text string) (string, error) { return func(text string) (string, error) {
if b.data == nil { if b.data == nil {
b.data = make(map[string]any) b.data = make(map[string]any)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment