golang switch break code example
Example: go switch statement
switch time {
case "morning":
fmt.Println("Time to wake up!")
case "night":
fmt.Println("Time to go to bed.")
default:
fmt.Println("Enjoy life")
}
switch time {
case "morning":
fmt.Println("Time to wake up!")
case "night":
fmt.Println("Time to go to bed.")
default:
fmt.Println("Enjoy life")
}