Documentation
¶
Overview ¶
Package namesgenerator generates random names.
This package provides functions for generating random names in the format "adjective_surname" with various options for delimiters and uniqueness.
For identifiers that must be unique within a process, use UniqueName or UniqueNameWith. For display purposes where uniqueness is not required, use NameWith.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NameDigitWith ¶
NameDigitWith returns a random name with a single random digit suffix (1-9), in the format "[adjective][delim][surname][digit]" e.g. "happy_smith9". Provides some collision resistance while keeping names short and clean. Not guaranteed to be unique.
func NameWith ¶
NameWith returns a random name with a custom delimiter. Names are not guaranteed to be unique.
func UniqueName ¶
func UniqueName() string
UniqueName returns a random name with a monotonically increasing suffix, guaranteeing uniqueness within the process. The name is truncated to 32 characters if necessary, preserving the numeric suffix.
func UniqueNameWith ¶
UniqueNameWith returns a unique name with a custom delimiter. See UniqueName for details on uniqueness guarantees.
Types ¶
This section is empty.