*: run go fmt

This commit is contained in:
Alexey Yerin 2021-05-11 11:33:29 +03:00
parent c792f7f570
commit b0c5f2c81d
2 changed files with 108 additions and 108 deletions

View File

@ -1,7 +1,7 @@
// Language code to name map lifted from py-googletrans: https://github.com/ssut/py-googletrans // Language code to name map lifted from py-googletrans: https://github.com/ssut/py-googletrans
package main package main
var Languages = map[string]string { var Languages = map[string]string{
"af": "afrikaans", "af": "afrikaans",
"sq": "albanian", "sq": "albanian",
"am": "amharic", "am": "amharic",

2
web.go
View File

@ -33,7 +33,7 @@ func CreateWebHandler(tmpl *template.Template, settings *TranslateSettings) func
translation, err := Translate(settings, from, to, text) translation, err := Translate(settings, from, to, text)
if err != nil { if err != nil {
w.WriteHeader(500) w.WriteHeader(500)
tmpl.ExecuteTemplate(w, "error", err); tmpl.ExecuteTemplate(w, "error", err)
return return
} }