diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-19 13:33:16 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-19 13:49:26 +0200 |
commit | 25fb88d7497b00bbe3dda540efde22ffd3de6e49 (patch) | |
tree | cce413d63228f7869a096a73475c4057879560ac /repository/mock_repo.go | |
parent | 7f5922f905831a85ffee4c9226b65715899ba758 (diff) | |
download | git-bug-25fb88d7497b00bbe3dda540efde22ffd3de6e49.tar.gz |
fix dependencies
Diffstat (limited to 'repository/mock_repo.go')
-rw-r--r-- | repository/mock_repo.go | 9 |
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") } } |