mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-29 05:50:17 -07:00
format
This commit is contained in:
parent
7aa1fba457
commit
fa67e9d2ce
@ -41,8 +41,7 @@ func (t Translator) Translate(message string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = json.Unmarshal(body, &data)
|
if err = json.Unmarshal(body, &data); err != nil {
|
||||||
if err != nil {
|
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,8 +80,7 @@ func (t Translator) PlaySound(lang string, message string) {
|
|||||||
for player.IsPlaying() {
|
for player.IsPlaying() {
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
err = player.Close()
|
if err = player.Close(); err != nil {
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user