mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 13:57:13 +00:00
21 lines
259 B
Go
21 lines
259 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func sayHello(c chan string) {
|
|
fmt.Println("vor")
|
|
c <- "Hello World"
|
|
fmt.Println("nach")
|
|
}
|
|
|
|
func main() {
|
|
c := make(chan string)
|
|
go sayHello(c)
|
|
fmt.Println("vor2")
|
|
text := <-c
|
|
fmt.Println("nach2")
|
|
fmt.Println(text)
|
|
}
|