aboutsummaryrefslogtreecommitdiffstats
path: root/repository/mock_repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/mock_repo.go')
-rw-r--r--repository/mock_repo.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/repository/mock_repo.go b/repository/mock_repo.go
index 1ac2c6e7..c5ac53a4 100644
--- a/repository/mock_repo.go
+++ b/repository/mock_repo.go
@@ -4,7 +4,6 @@ import (
"crypto/sha1"
"fmt"
"github.com/MichaelMure/git-bug/util"
- "github.com/pkg/errors"
)
// mockRepoForTest defines an instance of Repo that can be used for testing.
@@ -68,7 +67,7 @@ func (r *mockRepoForTest) ReadData(hash util.Hash) ([]byte, error) {
data, ok := r.blobs[hash]
if !ok {
- return nil, errors.New("unknown hash")
+ return nil, fmt.Errorf("unknown hash")
}
return data, nil
@@ -116,7 +115,7 @@ func (r *mockRepoForTest) CopyRef(source string, dest string) error {
hash, exist := r.refs[source]
if !exist {
- return errors.New("Unknown ref")
+ return fmt.Errorf("Unknown ref")
}
r.refs[dest] = hash
@@ -164,13 +163,13 @@ func (r *mockRepoForTest) ListEntries(hash util.Hash) ([]TreeEntry, error) {
commit, ok := r.commits[hash]
if !ok {
- return nil, errors.New("unknown hash")
+ return nil, fmt.Errorf("unknown hash")
}
data, ok = r.trees[commit.treeHash]
if !ok {
- return nil, errors.New("unknown hash")
+ return nil, fmt.Errorf("unknown hash")
}
}