Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDescriptors ¶
func DefaultDescriptors() []string
DefaultDescriptors returns a copy of the default descriptor list, for use with New by callers that want to substitute only the nouns.
Types ¶
type Namer ¶
type Namer interface {
// Name returns a randomly generated name of the form
// <descriptor>-<noun>.
Name() string
}
Namer generates random, human-friendly names.
func New ¶
New returns a Namer that composes names from the given descriptors and nouns. Both lists must be non-empty. The Namer keeps its own copies, so later changes to the lists passed in do not affect it.
func NewDefault ¶
func NewDefault() Namer
NewDefault returns a Namer that composes names from the default descriptor and noun lists.
Click to show internal directories.
Click to hide internal directories.