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