mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
feat: optimized-error-handling&remove unused constant (#772)
* feat: optimized-error-handling&remove unused constant * feat: optimized-error-handling --------- Co-authored-by: markwang <www.wang61@qq.com>
This commit is contained in:
@@ -60,11 +60,7 @@ func (shortLink *ShortLink) generate(shortLinkParams ShortLinker) (string, error
|
||||
// 使用通用方法返回错误
|
||||
var res resShortLinker
|
||||
err = util.DecodeWithError(response, &res, "GenerateShortLink")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return res.Link, nil
|
||||
return res.Link, err
|
||||
}
|
||||
|
||||
// GenerateShortLinkPermanent 生成永久 shortLink
|
||||
|
||||
Reference in New Issue
Block a user