Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RandomGenerator ¶
type RandomGenerator struct {
MaxLength int
SuffixLen int
// contains filtered or unexported fields
}
RandomGenerator generates a random name prefix.
func (RandomGenerator) PrefixedName ¶
func (g RandomGenerator) PrefixedName(prefix string) string
PrefixedName generates a name from the prefix with an additional random set of alphabetic characters.
If the prefix + the length of the random set of characters would exceed the MaxLength, then the prefix will be trimmed to accomodate the random string.
If the prefix ends with "-" this will be preserved in the trimmed string, before adding the prefix.
Click to show internal directories.
Click to hide internal directories.