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.
Go to file
2024-06-04 12:34:27 -05:00
generate-name_test.go initial commit 2024-06-04 12:34:27 -05:00
generate-name.go initial commit 2024-06-04 12:34:27 -05:00
go.mod initial commit 2024-06-04 12:34:27 -05:00
go.sum initial commit 2024-06-04 12:34:27 -05:00
LICENSE Initial commit 2024-06-04 14:45:04 +00:00
README.md initial commit 2024-06-04 12:34:27 -05:00

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"))
}