Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SliceIsSorted (0.2 sec)

  1. cmd/xl-storage-format-v2_test.go

    		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 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 08 17:50:48 GMT 2024
    - 36.4K bytes
    - Viewed (0)
  2. api/go1.8.txt

    pkg runtime, func SetMutexProfileFraction(int) int
    pkg runtime, type MemStats struct, NumForcedGC uint32
    pkg sort, func Slice(interface{}, func(int, int) bool)
    pkg sort, func SliceIsSorted(interface{}, func(int, int) bool) bool
    pkg sort, func SliceStable(interface{}, func(int, int) bool)
    pkg syscall (linux-arm-cgo), func TimevalToNsec(Timeval) int64
    pkg syscall (linux-arm), func TimevalToNsec(Timeval) int64
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Dec 21 05:25:57 GMT 2016
    - 16.3K bytes
    - Viewed (0)
  3. cmd/metacache-entries.go

    }
    
    // isSorted returns whether the objects are sorted.
    // This is usually orders of magnitude faster than actually sorting.
    func (m metaCacheEntries) isSorted() bool {
    	return sort.SliceIsSorted(m, m.less)
    }
    
    // shallowClone will create a shallow clone of the array objects,
    // but object metadata will not be cloned.
    func (m metaCacheEntries) shallowClone() metaCacheEntries {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. cmd/object-multipart-handlers.go

    		return
    	}
    	if len(complMultipartUpload.Parts) == 0 {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingPart), r.URL)
    		return
    	}
    
    	if !sort.SliceIsSorted(complMultipartUpload.Parts, func(i, j int) bool {
    		return complMultipartUpload.Parts[i].PartNumber < complMultipartUpload.Parts[j].PartNumber
    	}) {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidPartOrder), r.URL)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  5. cmd/xl-storage-format-v2.go

    }
    
    // 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 {
    		return x.versions[i].header.sortsBefore(x.versions[j].header)
    	}) {
    		return
    	}
    
    	// We should sort.
    	sort.Slice(x.versions, func(i, j int) bool {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 05:07:37 GMT 2024
    - 63.6K bytes
    - Viewed (1)
Back to top