errors: Drop WithMessage

This commit is contained in:
greatroar committed 2022-10-14 14:06:47 +02:00
1 parent 1a6160d152
commit ba44666704
3 files changed
+3 -7

No files matched your search

+2 -2
View File
@@ -2,11 +2,11 @@ package main
import (
"context"
"fmt"
"sync"
"time"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/restic"
)
@@ -45,7 +45,7 @@ func lockRepository(ctx context.Context, repo restic.Repository, exclusive bool)
lock, err := lockFn(ctx, repo)
if err != nil {
return nil, ctx, errors.WithMessage(err, "unable to create lock in backend")
return nil, ctx, fmt.Errorf("unable to create lock in backend: %w", err)
}
debug.Log("create lock %p (exclusive %v)", lock, exclusive)