Skip to content

Commit 967de8f

Browse files
authored
Merge pull request #2052 from sunnylovestiramisu/resize
Clean up unused func pickRandAndConsecutive
2 parents 453f3d2 + be0fc03 commit 967de8f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pkg/gce-pd-csi-driver/controller.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,20 +2539,6 @@ func createSingleZoneDisk(ctx context.Context, cloudProvider gce.GCECompute, nam
25392539
return disk, nil
25402540
}
25412541

2542-
func pickRandAndConsecutive(slice []string, n int) ([]string, error) {
2543-
if n > len(slice) {
2544-
return nil, fmt.Errorf("n: %v is greater than length of provided slice: %v", n, slice)
2545-
}
2546-
sort.Strings(slice)
2547-
start := rand.Intn(len(slice))
2548-
ret := []string{}
2549-
for i := 0; i < n; i++ {
2550-
idx := (start + i) % len(slice)
2551-
ret = append(ret, slice[idx])
2552-
}
2553-
return ret, nil
2554-
}
2555-
25562542
func newCsiErrorBackoff(initialDuration, errorBackoffMaxDuration time.Duration) *csiErrorBackoff {
25572543
return &csiErrorBackoff{flowcontrol.NewBackOff(initialDuration, errorBackoffMaxDuration), make(map[csiErrorBackoffId]codes.Code)}
25582544
}

0 commit comments

Comments
 (0)