select என்பது ஒரு goroutine பல channel operations -ஐ ஒரே நேரத்தில் காத்திருக்க அனுமதிக்கிறது, முதலில் தயாரான நிலையுடன் மேலே செல்கிறது. இது channels -க்கான switch போல உள்ளது — concurrent operations, timeouts, மற்றும் cancellation -ஐ coordinate செய்ய அত்যாவசியமானது.
பழுது select — பல channels -ஐ காத்திருக்கவும்
{
msg1 := <-ch1:
fmt.Println(, msg1)
msg2 := <-ch2:
fmt.Println(, msg2)
ch3 <- :
fmt.Println()
}
