ci: check format in CI pipeline (#17)
All checks were successful
CD / test (push) Successful in 20s
CD / Build and push (push) Successful in 2m41s

Reviewed-on: #17
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #17.
This commit is contained in:
2024-12-23 19:37:47 +01:00
committed by t.behrendt
parent a01c328ac5
commit ef57421268
5 changed files with 38 additions and 23 deletions

28
main.go
View File

@@ -74,20 +74,20 @@ func main() {
rdd := realDynDns.New(externalIpProvider, dnsProvider, notificationProvider, configClient.Domains)
switch configClient.Mode {
case config.ScheduledMode:
schedule, job, err := rdd.RunWithSchedule(configClient.CheckInterval)
if err != nil {
panic(err)
}
case config.ScheduledMode:
schedule, job, err := rdd.RunWithSchedule(configClient.CheckInterval)
if err != nil {
panic(err)
}
fmt.Println("Starting scheduler")
fmt.Println("Next run:", job.NextRun())
schedule.StartBlocking()
case config.RunOnceMode:
numberOfChanges, err := rdd.RunOnce()
if err != nil {
panic(err)
}
fmt.Println("Number of changes:", numberOfChanges)
fmt.Println("Starting scheduler")
fmt.Println("Next run:", job.NextRun())
schedule.StartBlocking()
case config.RunOnceMode:
numberOfChanges, err := rdd.RunOnce()
if err != nil {
panic(err)
}
fmt.Println("Number of changes:", numberOfChanges)
}
}