mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Refactor error handling logic and string formatting
Replaced constant with named error for readability and maintainability in the error handling condition. Adjusted error message formatting by removing an extra space for consistency.
This commit is contained in:
parent
27a3985240
commit
25b7f81e3b
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ type SendErrReason int
|
||||||
// Returns:
|
// Returns:
|
||||||
// - A string representing the error message.
|
// - A string representing the error message.
|
||||||
func (e *SendError) Error() string {
|
func (e *SendError) Error() string {
|
||||||
if e.Reason > 10 {
|
if e.Reason > ErrAmbiguous {
|
||||||
return "unknown reason"
|
return "unknown reason"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue