stdxgit.sr.ht/~pingoo/stdx/namesgenerator Index | Files

package namesgenerator

import "git.sr.ht/~pingoo/stdx/namesgenerator"

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 See also - https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go - https://github.com/lucasepe/codename - https://github.com/goombaio/namegenerator - https://github.com/Pallinder/go-randomdata - https://github.com/dustinkirkland/golang-petname - https://github.com/cip8/autoname?ref=golangexample.com

Index

Functions

func GetRandomName

func GetRandomName(suffix 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`

Source Files

namesgenerator.go

Version
v0.0.0-20240218134121-094174641f6e (latest)
Published
Feb 18, 2024
Platform
linux/amd64
Imports
2 packages
Last checked
4 months ago

Tools for package owners.