可以通过if条件执行多重赋值,如下代码?
func SendEmail(url, email string) (string, error) {
genUri := buildUri()
if err := setRedisIdentity(genUri, email); err != nil; genUrl, err := buildActivateUrl(url, genUri); {
return "", err
}
return "test", nil
尚方宝剑之说
相关分类