SMTPCode is a convenience function that returns one of its arguments depending on the result of exterrors.IsTemporary for the specified error object.
(err error, temporaryCode, permanentCode int)
| 128 | // depending on the result of exterrors.IsTemporary for the specified error |
| 129 | // object. |
| 130 | func SMTPCode(err error, temporaryCode, permanentCode int) int { |
| 131 | if IsTemporary(err) { |
| 132 | return temporaryCode |
| 133 | } |
| 134 | return permanentCode |
| 135 | } |
| 136 | |
| 137 | // SMTPEnchCode is a convenience function changes the first number of the SMTP enhanced |
| 138 | // status code based on the value exterrors.IsTemporary returns for the specified |
no test coverage detected