mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 13:57:13 +00:00
18 lines
141 B
Go
18 lines
141 B
Go
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
c := make(chan string)
|
||
|
|
||
|
go func() {
|
||
|
fmt.Println(<-c)
|
||
|
}()
|
||
|
|
||
|
c <- "Hello World!"
|
||
|
|
||
|
close(c)
|
||
|
|
||
|
}
|