Exercises & activities from the go workshop provided by Packt: https://courses.packtpub.com/courses/go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
359 B

  1. package main
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. func main() {
  7. dayBorn := time.Sunday
  8. switch dayBorn {
  9. case time.Monday, time.Tuesday, time.Wednesday,
  10. time.Thursday, time.Friday:
  11. fmt.Println("Gorn on a weekday")
  12. case time.Saturday, time.Sunday:
  13. fmt.Println("Born on the weekend")
  14. default:
  15. fmt.Println("Error, day born not valid")
  16. }
  17. }