Sign in
android
/
platform
/
prebuilts
/
go
/
windows-x86
/
7fb3c4cd96adbd78ba51a9b3fdb812e3091bf9fa
/
.
/
misc
/
tour
/
content
/
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.")
}
}