Skip to content

Instantly share code, notes, and snippets.

@yakuter
Created February 15, 2024 09:05
Show Gist options
  • Save yakuter/487adfee2df5e5387de11e956d688737 to your computer and use it in GitHub Desktop.
Save yakuter/487adfee2df5e5387de11e956d688737 to your computer and use it in GitHub Desktop.
Copy and Movement 5
package main
import (
"fmt"
"time"
)
func main() {
messageChannel := make(chan string)
go func() {
messageChannel <- "Hello, Channel!"
}()
message := <-messageChannel
fmt.Println("Received message:", message)
time.Sleep(time.Second)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment