Junior — Senior
What text will appear in the console when the program is run?
livecode
Task condition
Determine what output the console will display after executing the code below in Go.
package main
import "fmt"
func main() {
messageCh := make(chan string, 1)
close(messageCh)
doneCh := make(chan struct{})
close(doneCh)
select {
case messageCh <- "msg":
fmt.Println("msg sent")
case <-doneCh:
fmt.Println("stop signal received")
}
}