go-predictive-name-generator/README.md

19 lines
531 B
Markdown
Raw Normal View History

2024-06-04 14:45:04 +00:00
# go-predictive-name-generator
2024-06-04 17:34:27 +00:00
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"))
}
```