summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPaul Buetow (europa) <paul@buetow.org>2015-05-25 01:10:10 +0100
committerPaul Buetow (europa) <paul@buetow.org>2015-05-25 01:10:10 +0100
commitd38431533e517dfa3efc48d219701b25f77289ac (patch)
tree6847b08ce6979ad9d2a465266164621643030f3e /main
parent6e3ebb236e396c727564415d1f6b0fd1f2e72457 (diff)
move
Diffstat (limited to 'main')
-rw-r--r--main/main.go46
1 files changed, 0 insertions, 46 deletions
diff --git a/main/main.go b/main/main.go
deleted file mode 100644
index 6cef683..0000000
--- a/main/main.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package main
-
-import (
- "fmt"
- "github.com/buetow/gstat/process"
- "time"
-)
-
-func gather(timer <-chan bool, processes chan<- process.Process) {
- for {
- switch <-timer {
- case false:
- {
- break
- }
- case true:
- {
- process.Gather(processes)
- }
- }
- }
- close(processes)
-}
-
-func receive(processes <-chan process.Process) {
- for process := range processes {
- process.Print()
- }
-}
-
-func main() {
- timer := make(chan bool)
- res := make(chan process.Process)
-
- go gather(timer, res)
- go receive(res)
-
- for counter := 0; counter < 3; counter++ {
- timer <- true
- time.Sleep(time.Second)
- fmt.Printf("Next... %d\n", counter)
- }
- timer <- false
-
- fmt.Println("Good bye")
-}