What is the difference between switch and select in Go?
A select is only used with channels. Example A switch is used with concrete types. Example A select will choose multiple valid options at random, while aswitch will go in sequence (and would require a fallthrough to match multiple.) Note that a switch can also go over types for interfaces when used with the keyword … Read more