namesgenerator

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package namesgenerator generates random names.

This package is officially "frozen" - no new additions will be accepted.

For a long time, this package provided a lot of joy within the project, but at some point the conflicts of opinion became greater than the added joy.

At some future time, this may be replaced with something that sparks less controversy, but for now it will remain as-is.

See also https://github.com/moby/moby/pull/43210#issuecomment-1029934277

Index

Constants

This section is empty.

Variables

View Source
var (
	Left  = left[:]
	Right = right[:]

	Re = regexp.MustCompile(fmt.Sprintf("^(%s)_(%s)[0-9]?$", ls, rs))
)

Export the lists of left and right names

Functions

func GetRandomName

func GetRandomName(retry int) string

GetRandomName generates a random name from the list of adjectives and surnames in this package formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3`

func IsAutoName

func IsAutoName(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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