namesgenerator

package
v2.31.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

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

func NameDigitWith(delim string) string

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

func NameWith(delim string) string

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

func UniqueNameWith(delim string) string

UniqueNameWith returns a unique name with a custom delimiter. See UniqueName for details on uniqueness guarantees.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL