Skip to content

sio/coolname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random name and slug generator

coolname is a Golang port of a Python package by Alexander Lukanin. All hard work of creating and maintaing word lists happens upstream.

Documentation

See package docs at pkg.go.dev

Installation

$ go get github.com/sio/coolname

Usage

Importing the package

import "github.com/sio/coolname"

Generating cool names

>>> coolname.Slug()
"vegan-outrageous-bumblebee-of-discourse"
nil

>>> coolname.SlugN(2)
"crimson-caracal"
nil

>>> coolname.Generate()
[]string{
  "kind",
  "romantic",
  "markhor",
  "of",
  "luxury",
}
nil

Advanced configuration

Several tunable knobs are provided, check the docs and source code to be able to:

  • Provide custom word lists
  • Create new lists by combining existing ones via plain concatenation or via cartesian product (see config.json, custom JSON inputs are supported!)
  • Use custom random number generator

License and copyright

Golang port (this package)

Copyright 2023 Vitaly Potyarkin, Apache-2.0 License

Word lists and JSON config

Copyright 2015-2023 Alexander Lukanin and contributors, BSD-2-Clause License