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:
parent
efcb37e637
commit
fbf0bd78d8
@ -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(
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user