mirror of
https://github.com/kopia/kopia.git
synced 2026-10-25 15:48:47 -04:00
switched fmt.Errorf() to errors.Wrap()
This commit is contained in:
1 parent
440a1de2b2
commit
a6a153b22e
36 files changed
+123
-106
No files matched your search
@@ -2,12 +2,12 @@ package cli
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/kopia/kopia/internal/server"
|
||||
"github.com/kopia/repo"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -24,7 +24,7 @@ func init() {
|
||||
func runServer(ctx context.Context, rep *repo.Repository) error {
|
||||
srv, err := server.New(ctx, rep, getHostName(), getUserName())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to initialize server: %v", err)
|
||||
return errors.Wrap(err, "unable to initialize server")
|
||||
}
|
||||
|
||||
go rep.RefreshPeriodically(ctx, 10*time.Second)
|
||||
|
||||
Reference in new issue
Block a user