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

@@ -273,7 +273,7 @@ func testWalk(ctx context.Context, t *testing.T, _ *MetaStore) {
found := map[string]snapshots.Info{}
err := WalkInfo(ctx, func(ctx context.Context, info snapshots.Info) error {
if _, ok := found[info.Name]; ok {
return errors.Errorf("entry already encountered")
return errors.New("entry already encountered")
}
found[info.Name] = info
return nil