Do some minor cleanup

git-svn-id: file:///srv/svn/repo/mai/trunk@12 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
fattalion
2022-09-30 20:16:37 +00:00
parent a872b63b2f
commit 306e58d5af
4 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ import (
// LibreTranslate is an engine that interfaces with any
// [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) instance.
type LibreTranslate struct {
// InstanceURL is the URL to a LibreTranslate instance, for instance
// InstanceURL is the URL to a LibreTranslate instance, for example
// "https://libretranslate.com".
InstanceURL string
// APIKey is the API key for the given instance. If empty, then no API
@@ -130,7 +130,7 @@ type libreTranslateResponse struct {
TranslatedText string `json:"translatedText"`
}
func (e *LibreTranslate) Translate(text string, from Language, to Language) (TranslationResult, error) {
func (e *LibreTranslate) Translate(text string, from, to Language) (TranslationResult, error) {
formData := map[string]string{
"q": text,
"source": from.Code,