Updating logs from fmt to package log

This commit is contained in:
🐙PiperYxzzy
2022-08-06 23:35:42 +02:00
parent a3e2c4012a
commit b198814aa7
4 changed files with 21 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
package scheduled
import (
"fmt"
"log"
"time"
)
@@ -9,7 +9,7 @@ type Scheduled func() (string, time.Duration)
func ExecuteImmediatelyAndSchedule(f Scheduled) {
print, wait := f()
fmt.Println(print)
log.Println(print)
go ExecuteWithDelayAndSchedule(f, wait)
}
@@ -18,7 +18,7 @@ func ExecuteWithDelayAndSchedule(f Scheduled, wait time.Duration) {
time.Sleep(wait)
print, nextWait := f()
fmt.Println(print)
log.Println(print)
go ExecuteWithDelayAndSchedule(f, nextWait)
}