Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,804 for errorf (0.25 sec)

  1. internal/crypto/error.go

    func Errorf(format string, a ...interface{}) error {
    	e := fmt.Errorf(format, a...)
    	ee := Error{}
    	ee.msg = e.Error()
    	ee.cause = errors.Unwrap(e)
    	return ee
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.cause }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.msg == "" {
    		return "crypto: cause <nil>"
    	}
    	return e.msg
    }
    
    var (
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. internal/bucket/versioning/error.go

    package versioning
    
    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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  3. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  4. tests/update_test.go

    	if res := DB.Model(user).Updates(values); res.Error != nil {
    		t.Errorf("errors happened when update: %v", res.Error)
    	} else if res.RowsAffected != 1 {
    		t.Errorf("rows affected should be 1, but got : %v", res.RowsAffected)
    	} else if user.Age != 5 {
    		t.Errorf("Age should equals to 5, but got %v", user.Age)
    	} else if user.Active != true {
    		t.Errorf("Active should be true, but got %v", user.Active)
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  5. tests/scanner_valuer_test.go

    	if err := DB.Create(&data).Error; err != nil {
    		t.Errorf("Should got no error when creating data, but got %v", err)
    	}
    
    	if err := DB.Model(&data).Update("password", EncryptedData("xnewpass")).Error; err == nil {
    		t.Errorf("Should failed to update data with invalid data")
    	}
    
    	if err := DB.Model(&data).Update("password", EncryptedData("newpass")).Error; err != nil {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/asm/endtoend_test.go

    			t.Errorf("unexpected error: %v", line)
    			continue
    		}
    		fileline := m[1]
    		if errors[fileline] != "" && errors[fileline] != line {
    			t.Errorf("multiple errors on %s:\n\t%s\n\t%s", fileline, errors[fileline], line)
    			continue
    		}
    		errors[fileline] = line
    	}
    
    	// Reconstruct expected errors by independently "parsing" the input.
    	data, err := os.ReadFile(input)
    	if err != nil {
    		t.Error(err)
    		return
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  7. tests/soft_delete_test.go

    		t.Errorf("Table with escape character, got %v", sql)
    	}
    
    	if DB.First(&User{}, "name = ?", user.Name).Error == nil {
    		t.Errorf("Can't find a soft deleted record")
    	}
    
    	count = 0
    	if DB.Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 0 {
    		t.Errorf("Count soft deleted record, expects: %v, got: %v", 0, count)
    	}
    
    	age = 0
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  8. 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 Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  9. tests/embedded_struct_test.go

    		t.Errorf("no error should happen when query with embedded struct, but got %v", err)
    	} else if egNews.BasePost.Title != "engadget_news" {
    		t.Errorf("embedded struct's value should be scanned correctly")
    	}
    
    	var egPosts []EngadgetPost
    	if err := DB.Order("author_name asc").Find(&egPosts).Error; err != nil {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  10. tests/query_test.go

    		t.Errorf("Failed to batch find, got error %v, rows affected: %v", result.Error, result.RowsAffected)
    	}
    
    	var sub3 []User
    	if result := DB.Limit(4).Where("name = ?", users[0].Name).FindInBatches(&sub3, 2, func(tx *gorm.DB, batch int) error {
    		return nil
    	}); result.Error != nil || result.RowsAffected != 4 {
    		t.Errorf("Failed to batch find, got error %v, rows affected: %v", result.Error, result.RowsAffected)
    	}
    }
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 15 06:14:48 GMT 2024
    - 49.4K bytes
    - Viewed (0)
Back to top