Search Options

Results per page
Sort
Preferred Languages
Advance

Results 391 - 400 of 857 for NIL (0.01 sec)

  1. internal/bucket/lifecycle/delmarker-expiration_test.go

    			var dexp DelMarkerExpiration
    			var fail bool
    			err := xml.Unmarshal([]byte(test.xml), &dexp)
    			if test.err == nil {
    				if err != nil {
    					fail = true
    				}
    			} else {
    				if err == nil {
    					fail = true
    				}
    				if test.err.Error() != err.Error() {
    					fail = true
    				}
    			}
    			if fail {
    				t.Fatalf("Expected %v but got %v", test.err, err)
    			}
    		})
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. cmd/erasure-utils.go

    			if err != nil {
    				return 0, err
    			}
    			totalWritten += int64(n)
    			break
    		}
    
    		// Copy the block.
    		n, err := dst.Write(block)
    		if err != nil {
    			return 0, err
    		}
    
    		// Decrement output size.
    		write -= int64(n)
    
    		// Increment written.
    		totalWritten += int64(n)
    	}
    
    	// Success.
    	return totalWritten, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jan 31 02:11:45 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. internal/etag/etag_test.go

    	for i, test := range fromContentMD5Tests {
    		ETag, err := FromContentMD5(test.Header)
    		if err != nil && !test.ShouldFail {
    			t.Fatalf("Test %d: failed to convert Content-MD5 to ETag: %v", i, err)
    		}
    		if err == nil && test.ShouldFail {
    			t.Fatalf("Test %d: should have failed but succeeded", i)
    		}
    		if err == nil {
    			if !Equal(ETag, test.ETag) {
    				t.Fatalf("Test %d: got %q - want %q", i, ETag, test.ETag)
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  4. internal/event/targetid.go

    	var s string
    	if err := json.Unmarshal(data, &s); err != nil {
    		return err
    	}
    
    	targetID, err := parseTargetID(s)
    	if err != nil {
    		return err
    	}
    
    	*tid = *targetID
    	return nil
    }
    
    // parseTargetID - parses string to TargetID.
    func parseTargetID(s string) (*TargetID, error) {
    	tokens := strings.Split(s, ":")
    	if len(tokens) != 2 {
    		return nil, fmt.Errorf("invalid TargetID format '%v'", s)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  5. tests/update_has_many_test.go

    )
    
    func TestUpdateHasManyAssociations(t *testing.T) {
    	user := *GetUser("update-has-many", Config{})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}}
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user2 User
    	DB.Preload("Pets").Find(&user2, "id = ?", user.ID)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 2K bytes
    - Viewed (0)
  6. schema/index.go

    }
    
    func (schema *Schema) LookIndex(name string) *Index {
    	if schema != nil {
    		indexes := schema.ParseIndexes()
    		for _, index := range indexes {
    			if index.Name == name {
    				return &index
    			}
    
    			for _, field := range index.Fields {
    				if field.Name == name {
    					return &index
    				}
    			}
    		}
    	}
    
    	return nil
    }
    
    func parseFieldIndexes(field *Field) (indexes []Index, err error) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. cmd/erasure-heal_test.go

    		for j := 0; j < len(staleDisks); j++ {
    			if j < test.offDisks {
    				readers[j] = nil
    			} else {
    				staleDisks[j] = nil
    			}
    		}
    		for j := 0; j < test.badDisks; j++ {
    			switch r := readers[test.offDisks+j].(type) {
    			case *streamingBitrotReader:
    				r.disk = badDisk{nil}
    			case *wholeBitrotReader:
    				r.disk = badDisk{nil}
    			}
    		}
    		for j := 0; j < test.badStaleDisks; j++ {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  8. internal/bucket/replication/rule.go

    	if err := r.validateID(); err != nil {
    		return err
    	}
    	if err := r.validateStatus(); err != nil {
    		return err
    	}
    	if err := r.validateFilter(); err != nil {
    		return err
    	}
    	if err := r.DeleteMarkerReplication.Validate(); err != nil {
    		return err
    	}
    	if err := r.DeleteReplication.Validate(); err != nil {
    		return err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jan 24 23:22:20 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  9. internal/lock/lock_nix.go

    	default:
    		return nil, &os.PathError{
    			Op:   "open",
    			Path: path,
    			Err:  syscall.EINVAL,
    		}
    	}
    
    	f, err := os.OpenFile(path, flag|syscall.O_SYNC, perm)
    	if err != nil {
    		return nil, err
    	}
    
    	if err = syscall.Flock(int(f.Fd()), lockType); err != nil {
    		f.Close()
    		if err == syscall.EWOULDBLOCK {
    			err = ErrAlreadyLocked
    		}
    		return nil, err
    	}
    
    	st, err := os.Stat(path)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  10. internal/event/arn_test.go

    	testCases := []struct {
    		s           string
    		expectedARN *ARN
    		expectErr   bool
    	}{
    		{"", nil, true},
    		{"arn:minio:sqs:::", nil, true},
    		{"arn:minio:sqs::1:webhook:remote", nil, true},
    		{"arn:aws:sqs::1:webhook", nil, true},
    		{"arn:minio:sns::1:webhook", nil, true},
    		{"arn:minio:sqs::1:webhook", &ARN{TargetID{"1", "webhook"}, ""}, false},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 3.8K bytes
    - Viewed (0)
Back to top