This commit is contained in:
Michele Fadda 2018-11-27 15:10:19 +01:00
parent 5bc0076ecf
commit a2fc00df74
3 changed files with 23 additions and 4 deletions

View file

@ -6,6 +6,7 @@ import (
"time"
)
// Counterchan counter structure
type Counterchan struct {
tipo string
val int
@ -38,6 +39,7 @@ func NewCounter() *Counter {
}
}
// Run open channel to receive counter
func (c *Counter) Run() {
for {
tocount := <-counter