Update to go 1.24, small code cleanup

This commit is contained in:
ChaoticByte 2025-06-11 17:29:14 +02:00
parent 9f31bf557d
commit b3290c357d
No known key found for this signature in database
4 changed files with 3 additions and 13 deletions

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/ChaoticByte/wid-notifier
go 1.22
go 1.24

View file

@ -66,7 +66,7 @@ func (r Recipient) sendNotices(notices []WidNotice, template MailTemplate, auth
logger.error("Could not create mail from template")
logger.error(err)
}
// serialize & send mail
// serialize mail
data = mailContent.serializeValidMail(smtpConfig.From, r.Address)
// add to cache
(*cache)[n.Uuid] = data

View file

@ -25,16 +25,6 @@ type WidNotice struct {
PortalUrl string
}
// func (n WidNotice) serialized() ([]byte, error) {
// return json.Marshal(n)
// }
// func NewWidNoticeFromJSON(data []byte) (WidNotice, error) {
// n := WidNotice{}
// err := json.Unmarshal(data, &n)
// return n, err
// }
func noticeSliceContains(notices []WidNotice, notice WidNotice) bool {
for _, x := range notices {
if x.Uuid == notice.Uuid {

View file

@ -18,4 +18,4 @@ func NewPersistentData(c Config) PersistentData {
d.LastPublished[e.Id] = time.Now().Add(-time.Hour * 24) // a day ago
}
return d
}
}