names

package
Version: v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	PrefixedName(s string) string
}

Generator is implemented by values that generate a prefixed-nane.

type RandomGenerator

type RandomGenerator struct {
	// contains filtered or unexported fields
}

RandomGenerator generates a random name prefix.

func New

func New(r *rand.Rand) *RandomGenerator

New creates and returns a RandomGenerator.

func (RandomGenerator) PrefixedName

func (g RandomGenerator) PrefixedName(prefix string) string

PrefixedName generates a name from the prefix with an additional 5 random alphabetic characters. TODO: this should limit the length based on the prefix because branch names have a limit.

Jump to

Keyboard shortcuts

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