Skip to content

Commit

Permalink
change: lowercase error
Browse files Browse the repository at this point in the history
change: omit type
  • Loading branch information
salimnassim committed Jul 31, 2024
1 parent 269bfb8 commit 2a86d5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/dbcrypt/dbcrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var cryptor = DBCrypt[MyTable]{}
func (a *MyTable) encrypt(tx *gorm.DB) (err error) {
err = cryptor.EncryptStruct(a)
if err != nil {
err := tx.AddError(fmt.Errorf("Unable to encrypt password %v", err))
err := tx.AddError(fmt.Errorf("unable to encrypt password %v", err))
if err != nil {
return err
}
Expand All @@ -50,7 +50,7 @@ func (a *MyTable) BeforeSave(tx *gorm.DB) (err error) {
func (a *MyTable) AfterFind(tx *gorm.DB) (err error) {
err = cryptor.DecryptStruct(a)
if err != nil {
err := tx.AddError(fmt.Errorf("Unable to decrypt password %v", err))
err := tx.AddError(fmt.Errorf("unable to decrypt password %v", err))
if err != nil {
return err
}
Expand Down Expand Up @@ -80,7 +80,7 @@ func TestEncryptDecrypt(t *testing.T) {
Field1: "111111111",
PwdField: "ThePassword",
}
var originalPw string = clearData.PwdField
var originalPw = clearData.PwdField

cryptor := DBCrypt[MyTable]{}
err := cryptor.EncryptStruct(clearData)
Expand Down

0 comments on commit 2a86d5c

Please sign in to comment.