优化hhsh
This commit is contained in:
parent
c5b0fe3bb5
commit
e6a67581d7
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ func (a *Hhsh) GetMsg() string {
|
||||||
return err.Error()
|
return err.Error()
|
||||||
}
|
}
|
||||||
resultSlipe := data["data"].([]interface{})
|
resultSlipe := data["data"].([]interface{})
|
||||||
// fmt.Println("resultSlipe:", resultSlipe)
|
fmt.Println("resultSlipe:", resultSlipe)
|
||||||
if trans, ok := resultSlipe[0].(map[string]interface{})["trans"]; ok {
|
if trans, ok := resultSlipe[0].(map[string]interface{})["trans"]; ok {
|
||||||
// println("trans:", trans.([]interface{}))
|
// println("trans:", trans.([]interface{}))
|
||||||
transSlice := trans.([]interface{})
|
transSlice := trans.([]interface{})
|
||||||
|
@ -56,5 +56,5 @@ func (a *Hhsh) GetMsg() string {
|
||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
// return string(resultSlipe[0].([]byte))
|
// return string(resultSlipe[0].([]byte))
|
||||||
return "未找到关于" + resultSlipe[0].(map[string]interface{})["trans"].([]interface{})[0].(string) + "的释义"
|
return "未找到关于 " + parms[1] + " 的释义"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue