title: Go switch fallthrough
body: <p>I am trying to understand the switch/fallthrough keyword. Using fallthrough statement in a switch block means the next block is entered even if the expression doesn't match but this is only valid when there has already been a match right? The code below seems to work that way but I just want to be sure.</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
      integer := 5
      switch integer {
      case 4:
          fmt.Println("integer &lt;= 4")
          fallthrough
      case 5:
          fmt.Println("integer &lt;= 5")
          fallthrough
      case 6:
          fmt.Println("integer &lt;= 6")
          fallthrough
      case 7:
          fmt.Println("integer &lt;= 7")
          fallthrough
      case 8:
          fmt.Println("integer &lt;= 8")
          fallthrough
      default:
          fmt.Println("default case")
      }
  }
  </code></pre>