Created
June 6, 2014 19:13
-
-
Save bolilla/567557b6bc7a8a92b506 to your computer and use it in GitHub Desktop.
GoPadawan Concurrencia Select Default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
c := make(chan bool) | |
select { | |
case d := <-c: | |
fmt.Println("He leído", d) | |
default: | |
fmt.Println("Aquí nadie dice nada") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment