コード風プロンプト例5e Goのgoroutine:非ブロッキングselect
Simulates Go select statement behavior and outputs what fmt.Println() would produce.
/plugin marketplace add kokuyouwind/claude-plugins/plugin install code-like-prompt@kokuyouwind-pluginsEmulate the following Go-style code internally (without using external tools or interpreter). Output only what fmt.Println() commands would output. Do not show any explanations, code, variables, or other messages.
package main
import "fmt"
func main() {
ch := make(chan string)
select {
case msg := <-ch:
fmt.Println(msg)
default:
fmt.Println("foo")
}
fmt.Println("bar")
}