Search Options

Results per page
Sort
Preferred Languages
Advance

Results 371 - 380 of 938 for Nil$ (0.04 sec)

  1. internal/bucket/bandwidth/reader.go

    type MonitorReaderOptions struct {
    	BucketOptions
    	HeaderSize int
    }
    
    // Read implements a throttled read
    func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    	b := r.throttle.Burst()  // maximum available tokens
    	need := len(buf)         // number of bytes requested by caller
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 14:57:31 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. clause/select_test.go

    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}},
    			"SELECT * FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{
    				Columns: []clause.Column{clause.PrimaryColumn},
    			}, clause.From{}},
    			"SELECT `users`.`id` FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{
    				Columns: []clause.Column{clause.PrimaryColumn},
    			}, clause.Select{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Feb 18 01:06:43 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. cmd/api-headers.go

    	}
    
    	var start, rangeLen int64
    	totalObjectSize, err := objInfo.GetActualSize()
    	if err != nil {
    		return err
    	}
    
    	if rs == nil && opts.PartNumber > 0 {
    		rs = partNumberToRangeSpec(objInfo, opts.PartNumber)
    	}
    
    	// For providing ranged content
    	start, rangeLen, err = rs.GetOffsetLength(totalObjectSize)
    	if err != nil {
    		return err
    	}
    
    	// Set content length.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. cmd/utils.go

    		if err != nil {
    			return nil, err
    		}
    		fn := filepath.Join(dirPath, "cpu.out")
    		f, err := Create(fn)
    		if err != nil {
    			return nil, err
    		}
    		err = pprof.StartCPUProfile(f)
    		if err != nil {
    			return nil, err
    		}
    		prof.stopFn = func() ([]byte, error) {
    			pprof.StopCPUProfile()
    			err := f.Close()
    			if err != nil {
    				return nil, err
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  5. cmd/storage-rest_test.go

    		// file not found error.
    		{"foo", "yourobject", 0, nil, true},
    	}
    
    	result := make([]byte, 100)
    	for i, testCase := range testCases {
    		result = result[testCase.offset:3]
    		_, err := storage.ReadFile(context.Background(), testCase.volumeName, testCase.objectName, testCase.offset, result, nil)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 22 07:04:48 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. cmd/xl-storage_windows_test.go

    	dir := t.TempDir()
    
    	fs, err := newLocalXLStorage(dir)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// Create volume to use in conjunction with other StorageAPI's file API(s)
    	err = fs.MakeVol(context.Background(), "voldir")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	err = fs.AppendFile(context.Background(), "voldir", "/file", []byte("hello"))
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Nov 29 06:35:16 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  7. tests/associations_has_many_test.go

    	user := User{Name: "jinzhu", Languages: []Language{{Name: "EN"}}}
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	if err := DB.Model(&user).Association("Languages").Replace(Language{Name: "DE"}, Language{Name: "FR"}); err == nil {
    		t.Error("expected association error to be not nil")
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. tests/hooks_test.go

    	if err := DB.Create(&product).Error; err == nil {
    		t.Errorf("should got failed to save, but error is nil")
    	}
    
    	if DB.First(&Product4{}, "name = ?", product.Name).Error == nil {
    		t.Errorf("should got RecordNotFound, but got nil")
    	}
    
    	product = Product4{Name: "Product-2", Price: 100, Item: ProductItem{Code: "valid"}}
    	if err := DB.Create(&product).Error; err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  9. internal/grid/muxclient.go

    		return nil, err
    	}
    	if debugReqs {
    		fmt.Println(m.MuxID, m.parent.String(), "SEND")
    	}
    	// Wait for response or context.
    	select {
    	case v, ok := <-ch:
    		if !ok {
    			return nil, ErrDisconnected
    		}
    		if debugReqs && v.Err != nil {
    			v.Err = fmt.Errorf("%d %s RESP ERR: %w", m.MuxID, m.parent.String(), v.Err)
    		}
    		return v.Msg, v.Err
    	case <-ctx.Done():
    		if debugReqs {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  10. internal/bucket/versioning/versioning_test.go

    		v, err = ParseConfig(strings.NewReader(tc.input))
    		if tc.err != err {
    			t.Fatalf("Test %d: expected %v but got %v", i+1, tc.err, err)
    		}
    		if err != nil {
    			if tc.err == nil {
    				t.Fatalf("Test %d: failed due to %v", i+1, err)
    			}
    		} else {
    			if err := v.Validate(); tc.err != err {
    				t.Fatalf("Test %d: validation failed due to %v", i+1, err)
    			}
    			if len(tc.excludedPrefixes) > 0 {
    				var mismatch bool
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun May 08 05:06:44 UTC 2022
    - 8.8K bytes
    - Viewed (0)
Back to top