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