Last active
March 29, 2020 10:57
-
-
Save dumindu/d728128e5086070d624cc40101e4f490 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" | |
func main() { | |
ch := make(chan string) | |
go write(ch) | |
fmt.Println(<-ch) | |
} | |
func write(ch chan string) { | |
ch <- "Hello world!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment