mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-21 10:00:59 -07:00
style: comment
This commit is contained in:
parent
048f739356
commit
361d871161
@ -139,9 +139,8 @@ func (t *BingTranslate) Translate(message string) (translation, definition, part
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", "", err
|
return "", "", "", err
|
||||||
}
|
}
|
||||||
// Bing will return the request with list when success
|
// Bing will return the request with list when success.
|
||||||
// Otherwises, it would return map
|
// Otherwises, it would return map. Then the following err would not be nil.
|
||||||
// Then the following err would not be nil
|
|
||||||
if err = json.Unmarshal(body, &data); err == nil {
|
if err = json.Unmarshal(body, &data); err == nil {
|
||||||
poses := make(posSet)
|
poses := make(posSet)
|
||||||
for _, pos := range data[0].(map[string]interface{})["translations"].([]interface{}) {
|
for _, pos := range data[0].(map[string]interface{})["translations"].([]interface{}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user