package main

import (
    "fmt"
    "time"
)

func main() {
    t := time.Now()

    // switch true, or clearly written as just
    // 'switch'. what's the use for this?
    // writing if-else in a clean way

    switch {
        case t.Hour() < 12:
            fmt.Println("Good morning!")
        case t.Hour() < 17:
            fmt.Println("Good afternoon.")
        default:
            fmt.Println("Good evening.")
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: