Skip to content

Commit d50dc81

Browse files
authored
Remove random.Seed() call from robot-name's approach file
From the Go documentation on random.Seed(): Deprecated: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator.
1 parent ac0d232 commit d50dc81

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

exercises/practice/robot-name/.approaches/introduction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func generateRobotNames() []string {
4848
}
4949
}
5050

51-
rand.Seed(time.Now().UnixNano())
5251
rand.Shuffle(len(names), func(i, j int) { names[i], names[j] = names[j], names[i] })
5352
return names
5453
}

0 commit comments

Comments
 (0)