Sign in
go
/
website
/
47aa77ee5c8e76cb4901fd5877cc2abd39497bd7
/
.
/
_content
/
tour
/
flowcontrol
/
switch-with-no-condition.go
blob: e9f001c22a69d1cb09f15a5f5fb69a8c18e9af59 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import (
"fmt"
"time"
)
func main() {
t := time.Now()
switch {
case t.Hour() < 12:
fmt.Println("Good morning!")
case t.Hour() < 17:
fmt.Println("Good afternoon.")
default:
fmt.Println("Good evening.")
}
}