Last active
May 19, 2019 21:19
-
-
Save lakinduakash/98e896cc1f0f71779eb4eea2d350cbc0 to your computer and use it in GitHub Desktop.
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 world(c chan string) { | |
c <- "World!" | |
fmt.Println("World finished") | |
} | |
func main() { | |
c := make(chan string) | |
go world(c) | |
fmt.Println("Hello") | |
s := <-c | |
fmt.Println(s) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment