Created
February 15, 2024 09:05
-
-
Save yakuter/487adfee2df5e5387de11e956d688737 to your computer and use it in GitHub Desktop.
Copy and Movement 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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