package main
import (
"fmt"
"math/rand"
)
func main() {
z := 1
switch z {
// rand.Intn(10) == 1 as it uses the default seed
// anyway, the point is that we're calling a
// function in switch
case rand.Intn(10):
fmt.Println("yay ;)")
case 100:
fmt.Println("nope :(")
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: