Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for resourceList (0.27 sec)

  1. cmd/signature-v2_test.go

    func TestResourceListSorting(t *testing.T) {
    	sortedResourceList := make([]string, len(resourceList))
    	copy(sortedResourceList, resourceList)
    	sort.Strings(sortedResourceList)
    	for i := 0; i < len(resourceList); i++ {
    		if resourceList[i] != sortedResourceList[i] {
    			t.Errorf("Expected resourceList[%d] = \"%s\", resourceList is not correctly sorted.", i, sortedResourceList[i])
    			break
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Oct 14 10:08:40 GMT 2022
    - 8K bytes
    - Viewed (0)
  2. cmd/signature-v2.go

    	}
    
    	var canonicalQueries []string
    	for _, key := range resourceList {
    		val, ok := keyval[key]
    		if !ok {
    			continue
    		}
    		if val == "" {
    			canonicalQueries = append(canonicalQueries, key)
    			continue
    		}
    		canonicalQueries = append(canonicalQueries, key+"="+val)
    	}
    
    	// The queries will be already sorted as resourceList is sorted, if canonicalQueries
    	// is empty strings.Join returns empty.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
Back to top