Sign in
go
/
website
/
bf6873ed19d3076de3d82cb6cb47de35da2c941a
/
.
/
_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.")
}
}