Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for if (0.14 sec)

  1. internal/bucket/replication/and.go

    // isEmpty returns true if Tags field is null
    func (a And) isEmpty() bool {
    	return len(a.Tags) == 0 && a.Prefix == ""
    }
    
    // Validate - validates the And field
    func (a And) Validate() error {
    	if a.ContainsDuplicateTag() {
    		return errDuplicateTagKey
    	}
    	for _, t := range a.Tags {
    		if err := t.Validate(); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/and.go

    	// i.e, predCount >= 2
    	var predCount int
    	if a.Prefix.set {
    		predCount++
    	}
    	predCount += len(a.Tags)
    	if a.ObjectSizeGreaterThan > 0 {
    		predCount++
    	}
    	if a.ObjectSizeLessThan > 0 {
    		predCount++
    	}
    
    	if predCount < 2 {
    		return errXMLNotWellFormed
    	}
    
    	if a.ContainsDuplicateTag() {
    		return errDuplicateTagKey
    	}
    	for _, t := range a.Tags {
    		if err := t.Validate(); err != nil {
    			return err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top