Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,742 for Errorf (0.22 sec)

  1. cmd/httprange_test.go

    	}
    	for i, urs := range unparsableRangeSpecs {
    		rs, err := parseRequestRangeSpec(urs)
    		if err == nil {
    			t.Errorf("Case %d: Did not get an expected error - got %v", i, rs)
    		}
    		if isErrInvalidRange(err) {
    			t.Errorf("Case %d: Got invalid range error instead of a parse error", i)
    		}
    		if rs != nil {
    			t.Errorf("Case %d: Got non-nil rs though err != nil: %v", i, rs)
    		}
    	}
    
    	invalidRangeSpecs := []string{
    		"bytes=5-3",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. tests/count_test.go

    		t.Errorf("count with join, got error: %v, count %v", err, count4)
    	}
    
    	var count5 int64
    	if err := DB.Table("users").Where("users.name = ?", user1.Name).Order("name").Count(&count5).Error; err != nil || count5 != 1 {
    		t.Errorf("count with join, got error: %v, count %v", err, count)
    	}
    
    	var count6 int64
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  3. tests/named_argument_test.go

    		t.Errorf("should return record not found error, but got %v", err)
    	}
    
    	DB.Delete(&namedUser)
    
    	var result8 NamedUser
    	if err := DB.Where("name1 = @name OR name2 = @name", map[string]interface{}{"name": "jinzhu-new"}).First(&result8).Error; err == nil || !errors.Is(err, gorm.ErrRecordNotFound) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Dec 21 11:50:00 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  4. schema/naming_test.go

    	if idxName != "idx_public_table_name" {
    		t.Errorf("invalid index name generated, got %v", idxName)
    	}
    
    	chkName := ns.CheckerName("public.table", "name")
    	if chkName != "chk_public_table_name" {
    		t.Errorf("invalid checker name generated, got %v", chkName)
    	}
    
    	joinTable := ns.JoinTableName("user_languages")
    	if joinTable != "public.user_languages" {
    		t.Errorf("invalid join table generated, got %v", joinTable)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
  5. cni/pkg/repair/netns.go

    }
    
    func runInHost[T any](f func() (T, error)) (T, error) {
    	var res T
    	ns, err := netns.GetNS(getPidNamespace(1))
    	if err != nil {
    		return res, fmt.Errorf("failed to get host network: %v", err)
    	}
    	err = ns.Do(func(ns netns.NetNS) error {
    		var err error
    		res, err = f()
    		return err
    	})
    	if err != nil {
    		return res, fmt.Errorf("in host network: %v", err)
    	}
    	return res, nil
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Dec 20 22:14:13 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. cni/pkg/util/pluginutil.go

    )
    
    type Watcher struct {
    	watcher *fsnotify.Watcher
    	Events  chan struct{}
    	Errors  chan error
    }
    
    // Waits until a file is modified (returns nil), the context is cancelled (returns context error), or returns error
    func (w *Watcher) Wait(ctx context.Context) error {
    	select {
    	case <-w.Events:
    		return nil
    	case err := <-w.Errors:
    		return err
    	case <-ctx.Done():
    		return ctx.Err()
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. tests/callbacks_test.go

    				callMethod(v, "Register", c.name, c.h)
    			}
    
    			if e, ok := v.(error); !ok || e != nil {
    				err = e
    			}
    		}
    
    		if len(data.err) > 0 && err == nil {
    			t.Errorf("callbacks tests #%v should got error %v, but not", idx+1, data.err)
    		} else if len(data.err) == 0 && err != nil {
    			t.Errorf("callbacks tests #%v should not got error, but got %v", idx+1, err)
    		}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. schema/schema_helper_test.go

    			if r.Name != relation.Name {
    				t.Errorf("schema %v relation name expects %v, but got %v", s, r.Name, relation.Name)
    			}
    
    			if r.Type != relation.Type {
    				t.Errorf("schema %v relation name expects %v, but got %v", s, r.Type, relation.Type)
    			}
    
    			if r.Schema.Name != relation.Schema {
    				t.Errorf("schema %v relation's schema expects %v, but got %v", s, relation.Schema, r.Schema.Name)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  9. internal/bucket/replication/error.go

    package replication
    
    import (
    	"fmt"
    )
    
    // Error is the generic type for any error happening during tag
    // parsing.
    type Error struct {
    	err error
    }
    
    // Errorf - formats according to a format specifier and returns
    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  10. tests/delete_test.go

    		t.Errorf("errors happened when delete: %v", err)
    	}
    
    	if err := DB.Delete(&User{}).Error; err != gorm.ErrMissingWhereClause {
    		t.Errorf("errors happened when delete: %v", err)
    	}
    
    	if err := DB.Where("id = ?", users[0].ID).First(&result).Error; err == nil || !errors.Is(err, gorm.ErrRecordNotFound) {
    		t.Errorf("should returns record not found error, but got %v", err)
    	}
    }
    
    func TestDeleteWithTable(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
Back to top