19 lines
531 B
Markdown
19 lines
531 B
Markdown
# 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
|
|
|
|
```go
|
|
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"))
|
|
}
|
|
``` |