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