Pallinder/go-randomdata

Feature Request: Random sentence

Opened this issue · 1 comments

Hi,
Could you add a sentence generator?When generating some articles ,title and content are needed,content can be generated by randomdata.Paragraph(),but I don't find which one should be used for generating title.

For example:

// Print a sentence
fmt.Println(randomdata.Sentence())

I do something like this:

func generateTitleAndText(textLen uint) (string, string) {
	title := fmt.Sprintf("%v %v", randomdata.SillyName(), randomdata.SillyName())

	text := []string{randomdata.SillyName()}
	var i uint
	for i = 0; i < textLen; i++ {
		text = append(text, strings.ToLower(randomdata.SillyName()))
	}

	return title, strings.Join(text[:], " ")
}

But really would be nice to have a lorem ipsum kind of generator built-in.