diff --git a/channel/basic/main.go b/channel/basic/main.go new file mode 100644 index 0000000..fe1c3fe --- /dev/null +++ b/channel/basic/main.go @@ -0,0 +1,12 @@ +package main + +import "fmt" + +func main() { + done := make(chan int) + go func() { + fmt.Println("Hello World") + <-done + }() + done <- 1 +}