Switch and Select

Learn about switch and select in Go.

case statements break by default

Unlike in C-based languages, case statements in Go break by default. To make case statements fall through, use the fallthrough keyword:

Get hands-on with 1200+ tech skills courses.