49 }
50
51 if ok, _ := client.Extension("AUTH"); ok {
52 if err = client.Auth(auth); err != nil {53 return err
54 }
55 return nil
Some simple error checking patterns can be reduced to just a single return
statement returning a variable of type Error
.
if err != nil {
return err
}
return nil
return err