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.Now().Weekday() { case time.Saturday, time.Sunday: fmt.Println("It's the weekend") default: fmt.Println("It's a weekday") }