File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,11 @@ func (tbs *TokenBucketSet) GetMaxPeriod() time.Duration {
89
89
// debugState returns string that reflects the current state of all buckets in
90
90
// this set. It is intended to be used for debugging and testing only.
91
91
func (tbs * TokenBucketSet ) debugState () string {
92
- periods := sort . IntSlice ( make ([]int , 0 , len (tbs .buckets ) ))
92
+ periods := make ([]int64 , 0 , len (tbs .buckets ))
93
93
for period := range tbs .buckets {
94
- periods = append (periods , int (period ))
94
+ periods = append (periods , int64 (period ))
95
95
}
96
- sort .Sort (periods )
96
+ sort .Slice (periods , func ( i , j int ) bool { return periods [ i ] < periods [ j ] } )
97
97
bucketRepr := make ([]string , 0 , len (tbs .buckets ))
98
98
for _ , period := range periods {
99
99
bucket := tbs .buckets [time .Duration (period )]
You can’t perform that action at this time.
0 commit comments