It is possible to execute multiple assignment by if condition, like the following code?
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
}
It looks like you want something like this:
Output:
No. Only one 'simple statement' is permitted at the beginning of an if-statement, per the spec.
The recommended approach is multiple tests which might return an error, so I think you want something like: