Golang switch with multiple cases

We can use multiple values inside a single case block. In such case, the case block is executed if the expression matches with one of the case values.

Example:

dayOfWeek := 6

switch dayOfWeek {
  case 6,7:
    fmt.Println("Weekend")
  case 1,2,3,4,5:
    fmt.Println("Weekday")
  default:
    fmt.Println("Invalid day")
}