mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-21 21:30:50 +01:00
Remove unnecessary error handling
Eliminated redundant error handling for random number generation as errors from these functions do not require special attention. This reduces code complexity and improves readability.
This commit is contained in:
parent
f5d4cdafea
commit
77920be1a1
1 changed files with 2 additions and 2 deletions
4
msg.go
4
msg.go
|
@ -467,8 +467,8 @@ func (m *Msg) SetMessageID() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
hostname = "localhost.localdomain"
|
hostname = "localhost.localdomain"
|
||||||
}
|
}
|
||||||
randNumPrimary, _ := randNum(100000000)
|
randNumPrimary := randNum(100000000)
|
||||||
randNumSecondary, _ := randNum(10000)
|
randNumSecondary := randNum(10000)
|
||||||
randString, _ := randomStringSecure(17)
|
randString, _ := randomStringSecure(17)
|
||||||
procID := os.Getpid() * randNumSecondary
|
procID := os.Getpid() * randNumSecondary
|
||||||
messageID := fmt.Sprintf("%d.%d%d.%s@%s", procID, randNumPrimary, randNumSecondary,
|
messageID := fmt.Sprintf("%d.%d%d.%s@%s", procID, randNumPrimary, randNumSecondary,
|
||||||
|
|
Loading…
Reference in a new issue