fstests: add TestFsPutChunked
This commit is contained in:
parent
84289d1d69
commit
57273d364b
2 changed files with 126 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue