Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 1.25 KB

README.md

File metadata and controls

54 lines (33 loc) · 1.25 KB

readable-random

GoDoc Go Report Card

A Go package to generate readable random phrase.

GitHub Repository

Get started

To install,

go get github.com/sharadbhat/readable-random

Usage Instructions

To use the package, first import it.

import readable "github.com/sharadbhat/readable-random"

To generate a random phrase,

phrase := readable.Generate() // Eg: ForgetfulEgg

Has a method to allow for custom word count, custom separator and optional title casing.

phrase := readable.GenerateSpecial(false, 4, "_") // Eg: a_purple_psychotic_animal

Also has methods to return single adjective or noun.

adjective := readable.Adjective() // Eg: absurd

noun := readable.Noun() // Eg: opinion

Uses

  • This can be used to name and fetch user uploaded resources.

    Example: https://example.com/photos/ForgetfulEgg

  • Container names.

For best results, use a word count value of 2, 3, 4, or 5.