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

@@ -44,7 +44,7 @@ type Mounter interface {
func InitRootFS(ctx context.Context, name string, parent digest.Digest, readonly bool, snapshotter snapshots.Snapshotter, mounter Mounter) ([]mount.Mount, error) {
_, err := snapshotter.Stat(ctx, name)
if err == nil {
return nil, errors.Errorf("rootfs already exists")
return nil, errors.New("rootfs already exists")
}
// TODO: ensure not exist error once added to snapshot package