Created
January 18, 2018 09:23
-
-
Save jsgoller1/ae62e89c6ea4ce046fc5bc42b5a22e7c to your computer and use it in GitHub Desktop.
panic at the disco
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() { | |
mychan := make(chan int) | |
mychan <- 666 | |
go func() { | |
mychan <- 1 | |
mychan <- 2 | |
fmt.Println(<-mychan) | |
}() | |
fmt.Println(<-mychan) | |
fmt.Println(<-mychan) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment