func (g *NounGenerator) Sentences(n int) []string {
	contentLine := make([]string, 0, n)
	for i := 0; i < n; i++ {
		contentLine = append(contentLine, g.randomSentence(maxWords))
	}
	return contentLine
}
Sentences returns an array of n random sentences.
package text
import (
	"math/rand"
	"strings"
)
type Generator interface {
	Sentences(int) []string
}
const maxWords = 10
type NounGenerator struct {
	Nouns []string
}
func (g *NounGenerator) randomSentence(max int) string {
	r := rand.Intn(max)
	w := make([]string, 0)
	for i := 0; i <= r; i++ {
		w = append(w, g.randomNoun())
	}
	w[0] = strings.Title(w[0])
	return strings.Join(w, " ")
}
func (g *NounGenerator) randomNoun() string {
	return g.Nouns[rand.Intn(len(g.Nouns))]
}