Skip to content

Commit

Permalink
refactor: remove unused err
Browse files Browse the repository at this point in the history
  • Loading branch information
eeeXun committed Jul 9, 2023
1 parent 22aa6c5 commit f9571ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/translate/bing/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (t *Translator) Translate(message string) (translation *core.Translation, e
"key": {initData.key},
"token": {initData.token},
}
req, err := http.NewRequest(http.MethodPost,
req, _ := http.NewRequest(http.MethodPost,
fmt.Sprintf(textURL, initData.ig, initData.iid),
strings.NewReader(userData.Encode()),
)
Expand Down Expand Up @@ -128,7 +128,7 @@ func (t *Translator) Translate(message string) (translation *core.Translation, e
// request part of speech
userData.Del("fromLang")
userData.Add("from", langCode[t.GetSrcLang()])
req, err = http.NewRequest(http.MethodPost,
req, _ = http.NewRequest(http.MethodPost,
fmt.Sprintf(posURL, initData.ig, initData.iid),
strings.NewReader(userData.Encode()),
)
Expand Down Expand Up @@ -182,7 +182,7 @@ func (t *Translator) PlayTTS(lang, message string) error {
"key": {initData.key},
"token": {initData.token},
}
req, err := http.NewRequest(http.MethodPost,
req, _ := http.NewRequest(http.MethodPost,
fmt.Sprintf(ttsURL, initData.ig, initData.iid),
strings.NewReader(userData.Encode()),
)
Expand Down

0 comments on commit f9571ed

Please sign in to comment.