aboutsummaryrefslogtreecommitdiffstats
path: root/repository/gogit.go
diff options
context:
space:
mode:
authorguoguangwu <guoguangwug@gmail.com>2024-04-26 15:24:28 +0800
committersudoforge <no-reply@sudoforge.com>2024-07-23 20:22:15 -0700
commitd4f6f273bc36d8ce376cd7aee794458011fee2e0 (patch)
treebd2f95e167152d7554b10acd29d353370913e6f6 /repository/gogit.go
parent1fa858dcf4c4e7b572316705d70c08545abae7ff (diff)
downloadgit-bug-d4f6f273bc36d8ce376cd7aee794458011fee2e0.tar.gz
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com> chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Diffstat (limited to 'repository/gogit.go')
-rw-r--r--repository/gogit.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/repository/gogit.go b/repository/gogit.go
index 96d62665..95c5330d 100644
--- a/repository/gogit.go
+++ b/repository/gogit.go
@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"os"
"path/filepath"
"sort"
@@ -493,7 +492,7 @@ func (repo *GoGitRepo) ReadData(hash Hash) ([]byte, error) {
}
// TODO: return a io.Reader instead
- return ioutil.ReadAll(r)
+ return io.ReadAll(r)
}
// StoreTree will store a mapping key-->Hash as a Git tree
@@ -785,7 +784,7 @@ func (repo *GoGitRepo) AllClocks() (map[string]lamport.Clock, error) {
result := make(map[string]lamport.Clock)
- files, err := ioutil.ReadDir(filepath.Join(repo.localStorage.Root(), clockPath))
+ files, err := os.ReadDir(filepath.Join(repo.localStorage.Root(), clockPath))
if os.IsNotExist(err) {
return nil, nil
}