Merge pull request #4902 from shykes/wozniak_is_not_boring
Steve Wozniak is not boring.
This commit is contained in:
commit
99d4d5eb9f
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ func GenerateRandomName(checker NameChecker) (string, error) {
|
||||||
retry := 5
|
retry := 5
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
name := fmt.Sprintf("%s_%s", left[rand.Intn(len(left))], right[rand.Intn(len(right))])
|
name := fmt.Sprintf("%s_%s", left[rand.Intn(len(left))], right[rand.Intn(len(right))])
|
||||||
for checker != nil && checker.Exists(name) && retry > 0 {
|
for checker != nil && checker.Exists(name) && retry > 0 || name == "boring_wozniak" /* Steve Wozniak is not boring */ {
|
||||||
name = fmt.Sprintf("%s%d", name, rand.Intn(10))
|
name = fmt.Sprintf("%s%d", name, rand.Intn(10))
|
||||||
retry = retry - 1
|
retry = retry - 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue