mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
chore(code): use int ranges in loops BE-10990 (#12028)
This commit is contained in:
parent
468c12c75b
commit
31bdb948a8
12 changed files with 183 additions and 169 deletions
|
@ -40,10 +40,12 @@ func Test_generateRandomKey(t *testing.T) {
|
|||
|
||||
t.Run("Generated keys are unique", func(t *testing.T) {
|
||||
keys := make(map[string]bool)
|
||||
for i := 0; i < 100; i++ {
|
||||
|
||||
for range 100 {
|
||||
key := GenerateRandomKey(8)
|
||||
_, ok := keys[string(key)]
|
||||
is.False(ok)
|
||||
|
||||
keys[string(key)] = true
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue