go 基础switch
switch
arr1 := []string{"hello","world2"}
switch arr1[1] {
case "hello":
fmt.Println("hello")
case "world":
fmt.Println("world")
default:
fmt.Println("default")
}
switch
arr1 := []string{"hello","world2"}
switch arr1[1] {
case "hello":
fmt.Println("hello")
case "world":
fmt.Println("world")
default:
fmt.Println("default")
}