generator: Generate names deterministically
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var generatedNameIdx = 0
|
||||||
|
|
||||||
func GenerateRandomName() string {
|
func GenerateRandomName() string {
|
||||||
// From:
|
// From:
|
||||||
// https://docs.google.com/spreadsheets/d/1KOP4mNAX5R0N_dODE6j2gHTK2oTXCIrhAQ0dEniaYFw/htmlview
|
// https://docs.google.com/spreadsheets/d/1KOP4mNAX5R0N_dODE6j2gHTK2oTXCIrhAQ0dEniaYFw/htmlview
|
||||||
@@ -238,7 +240,9 @@ func GenerateRandomName() string {
|
|||||||
"Mike Lathja",
|
"Mike Lathja",
|
||||||
}
|
}
|
||||||
|
|
||||||
return names[rand.Intn(len(names))]
|
name := names[generatedNameIdx%len(names)]
|
||||||
|
generatedNameIdx = generatedNameIdx + 1
|
||||||
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateRandomMessageBody() string {
|
func GenerateRandomMessageBody() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user