daniel/generate.go

14 lines
190 B
Go
Raw Permalink Normal View History

2018-02-05 19:52:50 -07:00
package main
import (
"math/rand"
"time"
)
func genMessage(messageList []string) string {
rand.Seed(time.Now().UnixNano())
n := rand.Int() % len(messageList)
return messageList[n]
}