só atualiza se houver mudança no endereço

This commit is contained in:
2026-09-16 00:42:51 -03:00
parent 6c16f0da7a
commit 3b066755dd
2 changed files with 37 additions and 10 deletions
+4 -2
View File
@@ -61,7 +61,9 @@ func main() {
log.Fatalf("fatal: %v", err)
}
runErr := updater.Run(cfg)
u := updater.New()
runErr := u.Run(cfg)
if runErr != nil {
log.Printf("update pass completed with errors: %v", runErr)
}
@@ -85,7 +87,7 @@ func main() {
for {
select {
case <-ticker.C:
if err := updater.Run(cfg); err != nil {
if err := u.Run(cfg); err != nil {
log.Printf("update pass completed with errors: %v", err)
}
case sig := <-sigCh: