Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBlankAcrostic = errors.New("acrostic may not be blank")
ErrBlankAcrostic is returned when a given acrostic has a length of zero characters.
var ErrInvalidNumber = errors.New("number of returned acrostics less than 1 is not valid")
ErrInvalidNumber is returned when the number of requested acrostics is less than 1.
var ErrUninitialized = errors.New("acrostic object has not been initialized")
ErrUninitialized is returned when acrostics are requested from an uninitalized Acrostic object.
Functions ¶
This section is empty.
Types ¶
type Acrostic ¶
type Acrostic struct {
// contains filtered or unexported fields
}
Acrostic maintains a list of adjectives and nouns, and returns an acrostical phrase for a given word.
func NewAcrostic ¶
NewAcrostic accepts pointers to an adjective and noun word lists, and returns a pointer to a populated Acrostic object.
If the adjectives word list pointer is nil, the default adjectives word list will be used. Likewise for the nouns word list pointer.
func (*Acrostic) GenerateAcrostics ¶
GenerateAcrostics accepts an integer indicating the number of phrases to return, and returns a string slice with the results.
func (*Acrostic) GenerateRandomAcrostics ¶
GenerateRandomAcrostics accepts an acrostic length and an integer indicating the number of acrostics to return.