Updating logs from fmt to package log
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user