Skip to content

Instantly share code, notes, and snippets.

@sahajre
Last active August 2, 2019 04:00
Show Gist options
  • Save sahajre/01df16fd31d9eb6c87438cd11495f680 to your computer and use it in GitHub Desktop.
Save sahajre/01df16fd31d9eb6c87438cd11495f680 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
i := 42
switch i {
case 1:
fmt.Print("case 1")
fallthrough
case 42:
fmt.Print("Hello, ")
fallthrough
case 84:
fmt.Print("世")
fallthrough
case 404:
fmt.Println("界")
case 440:
fmt.Println("case 440")
default:
fmt.Println("default")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment