Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Random sentence #58

Open
zwl1619 opened this issue Nov 8, 2018 · 1 comment
Open

Feature Request: Random sentence #58

zwl1619 opened this issue Nov 8, 2018 · 1 comment

Comments

@zwl1619
Copy link

zwl1619 commented Nov 8, 2018

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())
@Sapphire64
Copy link

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.

@Pallinder Pallinder added this to the v1.2.0 milestone Mar 15, 2019
@Pallinder Pallinder removed this from the v1.2.0 milestone Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants