gofmt
This commit is contained in:
parent
5cfec0f2ef
commit
d3b6541945
@ -21,7 +21,7 @@ func tickReader(sem chan struct{}, ticker *time.Ticker, s string) io.Reader {
|
||||
fmt.Fprintf(w, "%s with %v\n", s, t)
|
||||
default: // try to comment this and then run :)
|
||||
}
|
||||
<-sem // add a ticket to the semaphore
|
||||
<-sem // add a ticket to the semaphore
|
||||
}
|
||||
}()
|
||||
return r
|
||||
@ -46,7 +46,7 @@ func main() {
|
||||
var (
|
||||
wg sync.WaitGroup
|
||||
semaphore = make(
|
||||
chan struct{},
|
||||
chan struct{},
|
||||
1, // only one goroutine can do its thing
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user