Update godeps
This commit is contained in:
parent
8b25cc67a5
commit
a736fba0e1
769 changed files with 15495 additions and 7996 deletions
18
vendor/k8s.io/kubernetes/pkg/util/rand/rand.go
generated
vendored
18
vendor/k8s.io/kubernetes/pkg/util/rand/rand.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -81,19 +81,3 @@ func String(length int) string {
|
|||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// A type that satisfies the rand.Shufflable interface can be shuffled
|
||||
// by Shuffle. Any sort.Interface will satisfy this interface.
|
||||
type Shufflable interface {
|
||||
Len() int
|
||||
Swap(i, j int)
|
||||
}
|
||||
|
||||
func Shuffle(data Shufflable) {
|
||||
rng.Lock()
|
||||
defer rng.Unlock()
|
||||
for i := 0; i < data.Len(); i++ {
|
||||
j := rng.rand.Intn(i + 1)
|
||||
data.Swap(i, j)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue