small fixups
Some checks failed
pr / test (pull_request) Failing after 1m6s
lint / lint (pull_request) Successful in 10m45s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-10-12 12:36:08 +03:00
parent ced277ff57
commit 8a9243636e
7 changed files with 31 additions and 48 deletions

View File

@@ -139,7 +139,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeLoad err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeLoad error", c.String()), err)
if !c.Options().AllowFail {
return err
}
@@ -154,7 +154,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterLoad err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterLoad error", c.String()), err)
if !c.Options().AllowFail {
return err
}
@@ -169,7 +169,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeSave err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeSave error", c.String()), err)
if !c.Options().AllowFail {
return err
}
@@ -184,7 +184,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterSave err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterSave error", c.String()), err)
if !c.Options().AllowFail {
return err
}
@@ -199,7 +199,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeInit err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s BeforeInit error", c.String()), err)
if !c.Options().AllowFail {
return err
}
@@ -214,7 +214,7 @@ var (
return nil
}
if err := fn(ctx, c); err != nil {
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterInit err: %v", c.String(), err), err)
c.Options().Logger.Error(ctx, fmt.Sprintf("%s AfterInit error", c.String(), err), err)
if !c.Options().AllowFail {
return err
}