Generate random, pronounceable, sometimes even memorable, "superhero like" codenames - just like Docker does with container names.

Overview

Codename

an RFC1178 implementation to generate pronounceable, sometimes even memorable, "superheroe like" codenames, consisting of a random combination of adjective and noun.

Usage

Codename it's a package, so all you need to do is import it into your code ( 👉 Try it!):

package main

import (
	"fmt"
	"github.com/lucasepe/codename"
)

func main() {
	rng, err := codename.DefaultRNG()
	if err != nil {
		panic(err)
	}

	for i := 0; i < 8; i++ {
		name := codename.Generate(rng, 0, false)
		fmt.Println(name)
	}
}

This is how the output looks like (since it's random your will be different).

absolute-karatecha
moving-colleen
game-nova
fine-madrox
pro-penguin
keen-morbius
firm-iron
refined-epoch

You can request the addition of a token to create even more entropy Try it!):

package main

import (
	"fmt"
	"github.com/lucasepe/codename"
)

func main() {
	rng, err := codename.DefaultRNG()
	if err != nil {
		panic(err)
	}

	for i := 0; i < 8; i++ {
		name := codename.Generate(rng, 4, false)
		fmt.Println(name)
	}
}

note the token (with the specified length) added at the end:

hopeful-toad-men-133b
blessed-man-thing-2bdc
unique-starfox-4271
full-butterfly-2470
accepted-santa-claus-e24e
merry-belphegor-65da
willing-medusa-cdf4
adapting-nightstar-f626
You might also like...
Rfpm - Random Fair Preemption Model For Golang

rfpm RFPM (Random Fair Preemption Model) is absolutely fair to all clients who r

Package reservoir samples values uniformly at random from an unbounded sequence of inputs

Package reservoir samples values uniformly at random from an unbounded sequence of inputs

Complete container management platform

Rancher Rancher is an open source project that provides a container management platform built for organizations that deploy containers in production.

Generic-list-go - Go container/list but with generics

generic-list-go Go container/list but with generics. The code is based on contai

Docker CE

Docker CE ⚠️ This repository is now deprecated and will be archived ⚠️ Starting with the Docker 20.10 release, packages for the Docker Engine and Dock

Gorsair hacks its way into remote docker containers that expose their APIs
Gorsair hacks its way into remote docker containers that expose their APIs

Gorsair Gorsair is a penetration testing tool for discovering and remotely accessing Docker APIs from vulnerable Docker containers. Once it has access

TUI Client for Docker
TUI Client for Docker

docui - TUI Client for Docker Written in Go About docui docui is a TUI Client for Docker. It can do the following: image search/pull/remove save/impor

Experimental code execution microservice based on Docker containers.
Experimental code execution microservice based on Docker containers.

ranna ランナー - Experimental code runner microservice based on Docker containers. ⚠ PLEASE READ BEFORE USE First of all, this project is currently work i

Workaround for running ubuntu:21.10, fedora:35, and other glibc = 2.34 distros on Docker = 20.10.9

clone3-workaround: Workaround for running ubuntu:21.10, fedora:35, and other glibc = 2.34 distros on Docker = 20.10.9 Old container engines such as

Owner
Luca Sepe
Software Craftsman [Golang / CLI tools], Avid Learner, Passionate Sharer of acquired knowledge.
Luca Sepe
Generate possible AD usernames from names like John Doe > J.Doe or JDoe

GOtusernames Generate possible AD usernames from names like John Doe > J.Doe or JDoe Example user file: ~/programming/golang/src/gotyourusername ❯ cat

null 4 Jan 4, 2022
Names things like they're action movies from the mid 90s.

thing-namer Names things like they're action movies from the mid 90s. Installing You know the drill. go get github.com/Unquabain/thing-namer Building

Ben C. Forsberg 0 Nov 6, 2021
Autoname - Friendly names generator with golang

autoname Friendly names generator inspired by moby's work. import "github.com/ci

Ciprian 4 Oct 16, 2022
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

The Moby Project Moby is an open-source project created by Docker to enable and accelerate software containerization. It provides a "Lego set" of tool

Moby 64.6k Nov 30, 2022
Monitoring Go application inside docker container by InfluxDB, Telegraf, Grafana

REST API for TreatField app Docker compose for TIG and Golang simple app: https://github.com/tochytskyi/treatfield-api/blob/main/docker-compose.yml Gr

Volodymyr Tochytskyi 0 Nov 6, 2021
Random fake data and struct generator for Go.

Faker Random fake data and struct generator for Go. More than 100 generator functions Struct generator Unique data generator Builtin types support Eas

Enrico 67 Oct 3, 2022
Random fake data generator written in go

Gofakeit Random data generator written in go Features 160+ Functions!!! Concurrent Global Rand Struct Generator Custom Functions Http Server Command L

Brian Voelker 2.8k Dec 1, 2022
A repository of random code snippets used to develop proof of concepts

Oddments Oddments is a repository of random code snippets used to develop proof of concepts for techniques used with the Windows operating system. POC

Russel Van Tuyl 7 Oct 13, 2022
Helps exercise your memory by giving you random tokens and poems to memorize.

memory-enhancer Helps exercise your memory by giving you random tokens and poems to memorize. Using Every day when you first open your terminal you wi

Miguel Pinheiro 0 Nov 9, 2021
Randomdata : a tiny help suite for generating random data

go-randomdata randomdata is a tiny help suite for generating random data such as first names (male or female) last names full names (male or female) c

Kalyan Janumpally 0 Dec 5, 2021