From 9cb1eb157df2de79042caa412510bd5e5cb498a4 Mon Sep 17 00:00:00 2001
From: Moses Narrow
+
-
+
@@ -18,21 +19,19 @@
-
-
-
-
+
+
+
+
-Get The Module
-|
Documentation
|
Contributing
@@ -49,11 +48,6 @@
AtomicGo | schedule
-
-
- -----------------------------------------------------------------------------------------------------
-
-
- - ----------------------------------------------------------------------------------------------------- - - |
+ + ```go package main @@ -143,7 +136,8 @@ func main() {
+ + ```go package main @@ -178,17 +174,20 @@ func main() {
+ + ```go package main @@ -200,8 +199,9 @@ import ( ) func main() { - task := schedule.Every(5*time.Second, func() { - fmt.Println("5 seconds are over!") + task := schedule.Every(time.Second, func() bool { + fmt.Println("1 second is over!") + return true // return false to stop the task }) fmt.Println("Some stuff happening...") @@ -215,7 +215,8 @@ func main() {