v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-28 05:20:12 -07:00

style: Declare string only once

This commit is contained in:
eeeXun 2023-02-12 17:28:40 +08:00
parent efcb37e637
commit fbf0bd78d8
2 changed files with 2 additions and 6 deletions

View File

@ -50,11 +50,7 @@ func (t *ApertiumTranslate) SwapLang() {
t.srcLang, t.dstLang = t.dstLang, t.srcLang
}
func (t *ApertiumTranslate) Translate(message string) (
translation string,
definition string,
partOfSpeech string,
err error) {
func (t *ApertiumTranslate) Translate(message string) (translation, definition, partOfSpeech string, err error) {
var data interface{}
urlStr := fmt.Sprintf(

View File

@ -16,7 +16,7 @@ func (t *ApertiumTranslate) StopTTS() {
t.SoundLock.Stop = true
}
func (t *ApertiumTranslate) PlayTTS(lang string, message string) error {
func (t *ApertiumTranslate) PlayTTS(lang, message string) error {
t.SoundLock.Release()
return errors.New(t.EngineName + " does not support text to speech")
}