From 53cb78e13825c46d3bde749b935856c605faad61 Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Mon, 29 Sep 2025 21:42:03 +0200 Subject: [PATCH 1/2] Change module url to remotebranch.eu --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index acbf5d6..699bc33 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/ChaoticByte/wid-notifier +module remotebranch.eu/ChaoticByte/wid-notifier go 1.24 From 1cae5b086f8a5393805ef1276d9296564bf76656 Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Sun, 12 Apr 2026 21:38:20 +0200 Subject: [PATCH 2/2] Update to Go 1.26.2, small code improvements based on linter hints --- go.mod | 2 +- main.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 699bc33..9703a26 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module remotebranch.eu/ChaoticByte/wid-notifier -go 1.24 +go 1.26.2 diff --git a/main.go b/main.go index d239bf0..a5d829e 100644 --- a/main.go +++ b/main.go @@ -34,10 +34,11 @@ func main() { os.Exit(1) } for _, arg := range args { - if arg == "-h" || arg == "--help" { + switch arg { + case "-h", "--help": showHelp() os.Exit(0) - } else if arg == "--version" { + case "--version": showVersion() os.Exit(0) } @@ -140,7 +141,7 @@ func main() { for r, notices := range noticesToBeSent { // sort by publish date slices.SortFunc(notices, func(a *WidNotice, b *WidNotice) int { - if a.Published == b.Published { + if a.Published.Equal(b.Published) { return 0 } else if a.Published.After(b.Published) { return 1