Sign in
go
/
website
/
refs/heads/master
/
.
/
_content
/
tour
/
flowcontrol
/
switch-with-no-condition.go
blob: d2fef929b4320e3d76be06bbf80a5435ae041b1c [
file
] [
log
] [
blame
]
//go: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.")
}
}