- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for sortByModTime (0.15 sec)
-
cmd/xl-storage-format-v2.go
} dds = append(dds, obj.ObjectV1.DataDir) } } return dds, nil } // sortByModTime will sort versions by modtime in descending order, // meaning index 0 will be latest version. func (x *xlMetaV2) sortByModTime() { // Quick check if len(x.versions) <= 1 || sort.SliceIsSorted(x.versions, func(i, j int) bool {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 64K bytes - Viewed (1) -
cmd/xl-storage-format-v2_test.go
if err != nil { t.Fatal(err) } test := func(t *testing.T, xl *xlMetaV2) { if len(xl.versions) != 855 { t.Errorf("want %d versions, got %d", 855, len(xl.versions)) } xl.sortByModTime() if !sort.SliceIsSorted(xl.versions, func(i, j int) bool { return xl.versions[i].header.ModTime > xl.versions[j].header.ModTime }) { t.Errorf("Contents not sorted") } for i := range xl.versions {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Mar 08 17:50:48 UTC 2024 - 36.4K bytes - Viewed (0)