Golang-fallthrough关键字
package main
import "fmt"
func main() {
switch 8 {
case 8:
fmt.Println(8)
fallthrough
case 7:
fmt.Println(7)
fallthrough
case 6:
fmt.Println(6)
default:
fmt.Println(0)
}
}Last updated