mirror of
https://github.com/rclone/rclone.git
synced 2025-06-06 12:54:34 +08:00
fstests: add TestFsPutChunked
This commit is contained in:

committed by
Nick Craig-Wood

parent
84289d1d69
commit
57273d364b
@ -4,6 +4,7 @@ package fs
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@ -130,3 +131,15 @@ func (x *SizeSuffix) Scan(s fmt.ScanState, ch rune) error {
|
||||
}
|
||||
return x.Set(string(token))
|
||||
}
|
||||
|
||||
// SizeSuffixList is a sclice SizeSuffix values
|
||||
type SizeSuffixList []SizeSuffix
|
||||
|
||||
func (l SizeSuffixList) Len() int { return len(l) }
|
||||
func (l SizeSuffixList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
|
||||
func (l SizeSuffixList) Less(i, j int) bool { return l[i] < l[j] }
|
||||
|
||||
// Sort sorts the list
|
||||
func (l SizeSuffixList) Sort() {
|
||||
sort.Sort(l)
|
||||
}
|
||||
|
Reference in New Issue
Block a user