mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-07-20 07:02:53 +02:00
initial import
This commit is contained in:
17
concurrency/channels/main.go
Normal file
17
concurrency/channels/main.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
c := make(chan string)
|
||||
|
||||
go func() {
|
||||
fmt.Println(<-c)
|
||||
}()
|
||||
|
||||
c <- "Hello World!"
|
||||
|
||||
close(c)
|
||||
|
||||
}
|
Reference in New Issue
Block a user