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:
Winni Neessen 2024-09-20 20:39:50 +02:00
parent f5d4cdafea
commit 77920be1a1
Signed by: wneessen
GPG key ID: 385AC9889632126E

4
msg.go
View file

@ -467,8 +467,8 @@ func (m *Msg) SetMessageID() {
if err != nil {
hostname = "localhost.localdomain"
}
randNumPrimary, _ := randNum(100000000)
randNumSecondary, _ := randNum(10000)
randNumPrimary := randNum(100000000)
randNumSecondary := randNum(10000)
randString, _ := randomStringSecure(17)
procID := os.Getpid() * randNumSecondary
messageID := fmt.Sprintf("%d.%d%d.%s@%s", procID, randNumPrimary, randNumSecondary,