88 sigs := make(chan os.Signal, 1)
89 signal.Notify(sigs, syscall.SIGCHLD)
90 for {
91 select { 92 case <-sigs:
93 }
94 for {
Select statements with a single case can be replaced with a simple send or
receive. If you intend to handle the case when no value is received from
the channel, add a default
case to make the select
statement non-blocking.
select {
case x := <-ch:
fmt.Println(x)
}
x := <-ch
fmt.Println(x)