Browse Source

fix spacing

master
Chakib Benziane 1 year ago
parent
commit
0c65f2c56c
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      README.md

+ 10
- 10
README.md View File

@@ -37,24 +37,24 @@ type Worker struct{}
37 37
 
38 38
 // Example loop, it will be spwaned in a goroutine
39 39
 func (w *Worker) Spawn(um UnitManager) {
40
-	ticker := time.NewTicker(time.Second)
40
+    ticker := time.NewTicker(time.Second)
41 41
 
42 42
     // Worker's loop
43
-	for {
44
-		select {
45
-		case <-ticker.C:
46
-			log.Println("tick")
43
+    for {
44
+        select {
45
+        case <-ticker.C:
46
+            log.Println("tick")
47 47
 
48 48
         // Read from channel if this worker unit should stop
49
-		case <-um.ShouldStop():
49
+        case <-um.ShouldStop():
50 50
 
51 51
             // Shutdown work for current unit
52
-			w.Shutdown()
52
+            w.Shutdown()
53 53
 
54 54
             // Notify manager that this unit is done.
55
-			um.Done()
56
-		}
57
-	}
55
+            um.Done()
56
+        }
57
+    }
58 58
 }
59 59
 
60 60
 func (w *Worker) Shutdown() {

Loading…
Cancel
Save