daniel/generate.go
2018-02-05 19:52:50 -07:00

14 lines
190 B
Go

package main
import (
"math/rand"
"time"
)
func genMessage(messageList []string) string {
rand.Seed(time.Now().UnixNano())
n := rand.Int() % len(messageList)
return messageList[n]
}