codenamegenerator

package module
v0.0.0-...-dcce7d0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 9 Imported by: 0

README

Code Name Generator

A Go package to generate a three-word code name for multi-purpose use. The package relies on codenamegenerator.com for generation as opposed to lengthy slices within the package.

The output is as follows: <string>-<string>-<string>.

Badges

Go Report Card

Install

go get github.com/jmvbxx/codenamegenerator

Update

go get -u github.com/jmvbxx/codenamegenerator

Usage

package main

import (
	"fmt"
	"log"

	"github.com/jmvbxx/codenamegenerator"
)

func main() {
	cn, err := codenamegenerator.NameGenerate()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(cn)
}

Example output

brussels-ankara-yowie

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CommonCodeNames = []string{"animals", "apple", "birds", "bugs", "dogs", "fishes",
		"flowers", "metal", "microsoft", "snakes", "units", "unusual_animals", "us_cities",
		"us_counties", "us_state_capitals", "us_states", "world_capitals", "world_countries"}
)

Functions

func NameGenerate

func NameGenerate() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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