From 2a86d5cf149370fd0ba1e311fc29966eaeb6500d Mon Sep 17 00:00:00 2001 From: Salim Nassim Date: Wed, 31 Jul 2024 13:16:47 +0200 Subject: [PATCH] change: lowercase error change: omit type --- pkg/dbcrypt/dbcrypt_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/dbcrypt/dbcrypt_test.go b/pkg/dbcrypt/dbcrypt_test.go index 8e334ca..47bca59 100644 --- a/pkg/dbcrypt/dbcrypt_test.go +++ b/pkg/dbcrypt/dbcrypt_test.go @@ -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 } @@ -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 } @@ -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)