Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SliceIsSorted (0.06 sec)

  1. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  2. 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)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  3. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
Back to top