Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cleanMetadataKeys (0.13 sec)

  1. cmd/object-api-utils_test.go

    			t.Errorf("Test %s failed, expected %v, got %v", tt.name, tt.want, got)
    		}
    	}
    }
    
    // Tests CleanMetadataKeys method. Expectation is metadata map
    // should be cleared of keys passed to CleanMetadataKeys method
    func TestCleanMetadataKeys(t *testing.T) {
    	tests := []struct {
    		name     string
    		metadata map[string]string
    		keys     []string
    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-api-utils.go

    	if metadata[xhttp.AmzStorageClass] == storageclass.STANDARD {
    		delete(metadata, xhttp.AmzStorageClass)
    	}
    	return metadata
    }
    
    // cleanMetadataKeys takes keyNames to be filtered
    // and returns a new map with all the entries with keyNames removed.
    func cleanMetadataKeys(metadata map[string]string, keyNames ...string) map[string]string {
    	newMeta := make(map[string]string, len(metadata))
    	for k, v := range metadata {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
Back to top