Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cae5b086f | |||
| 53cb78e138 |
2 changed files with 6 additions and 5 deletions
4
go.mod
4
go.mod
|
|
@ -1,3 +1,3 @@
|
|||
module github.com/ChaoticByte/wid-notifier
|
||||
module remotebranch.eu/ChaoticByte/wid-notifier
|
||||
|
||||
go 1.24
|
||||
go 1.26.2
|
||||
|
|
|
|||
7
main.go
7
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue