Remove else statement with single return sentence

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-08-23 13:14:49 -04:00
parent 161fc48b5a
commit 3194260c05

View File

@ -47,9 +47,8 @@ type GenericError struct {
func (e *GenericError) Error() string {
if e.Details != "" {
return fmt.Sprintf("%s: %s", e.Err, e.Details)
} else {
return fmt.Sprintf("%s", e.Err)
}
return fmt.Sprintf("%s", e.Err)
}
// AuthenticateUserRequest represents the body of a request to POST /auth