Created
April 5, 2020 05:57
-
-
Save dumindu/60a61adf5a7fe62a23a015365f3699f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
var ch = make(chan string) | |
func main() { | |
go write() | |
fmt.Println(<-ch) | |
} | |
func write() { | |
ch <- "Hello world!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment