go-predictive-name-generator/README.md
2024-06-04 12:34:27 -05:00

531 B

go-predictive-name-generator

Based on the work from the docker name generator (https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go) this package uses a seed to determine the name making it predictive and repeatable.

Usage

import (
    "fmt"
    namegen "gitea.smoothnet.org/nhyatt/go-predictive-name-generator"
)

func main() {
    n := namegen.New()

    fmt.Printf("GeneratedName: %s\n", n.GetRandom())
    fmt.Printf("GeneratedName: %s\n", n.GetPredictive("this is a seed string"))
}