feat: Errorf usage

Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
haoyun
2021-12-13 14:31:53 +08:00
parent a04656c1dd
commit c0d07094be
30 changed files with 80 additions and 80 deletions

View File

@@ -239,7 +239,7 @@ func (s *snapshotter) Remove(ctx context.Context, key string) error {
if err := t.Commit(); err != nil {
if err1 := os.Rename(renamed, path); err1 != nil {
// May cause inconsistent data on disk
log.G(ctx).WithError(err1).WithField("path", renamed).Errorf("Failed to rename after failed commit")
log.G(ctx).WithError(err1).WithField("path", renamed).Error("Failed to rename after failed commit")
}
return errors.Wrap(err, "failed to commit")
}