mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-17 08:10:22 -07:00
refactor: remove unneeded addition assignment operator
ApertiumTranslate and ArgosTranslate don't need it for translation. Just use assignment operator.
This commit is contained in:
parent
62987e6c5e
commit
39c892156c
@ -60,7 +60,7 @@ func (t *ApertiumTranslate) Translate(message string) (translation, definition,
|
||||
|
||||
switch res.StatusCode {
|
||||
case 200:
|
||||
translation += fmt.Sprintf("%v",
|
||||
translation = fmt.Sprintf("%v",
|
||||
data["responseData"].(map[string]interface{})["translatedText"])
|
||||
default:
|
||||
return "", "", "", errors.New(
|
||||
|
@ -57,7 +57,7 @@ func (t *ArgosTranslate) Translate(message string) (translation, definition, par
|
||||
return "", "", "", errors.New("Translation not found")
|
||||
}
|
||||
|
||||
translation += fmt.Sprintf("%v", data["translatedText"])
|
||||
translation = fmt.Sprintf("%v", data["translatedText"])
|
||||
|
||||
return translation, definition, partOfSpeech, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user