diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-05-15 20:22:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 20:22:28 +0100 |
commit | 4ff2213cc5422d3300cf9828ea0781820888d32d (patch) | |
tree | 9226bdd5f898f0813126e6df5f99ddf2bfec08c5 /worktree_test.go | |
parent | dc2b346ed149080199d578f0190f3ac1156480c2 (diff) | |
parent | bddd89e697ebdaad2fe341b3e8a3233691f5544a (diff) | |
download | go-git-4ff2213cc5422d3300cf9828ea0781820888d32d.tar.gz |
Merge pull request #770 from pjbgf/small-fixes
*: Small fixes across the codebase
Diffstat (limited to 'worktree_test.go')
-rw-r--r-- | worktree_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/worktree_test.go b/worktree_test.go index 4f55844..ea55ac6 100644 --- a/worktree_test.go +++ b/worktree_test.go @@ -5,7 +5,6 @@ import ( "context" "errors" "io" - "io/ioutil" "os" "path/filepath" "regexp" @@ -81,7 +80,7 @@ func (s *WorktreeSuite) TestPullFastForward(c *C) { w, err := server.Worktree() c.Assert(err, IsNil) - err = ioutil.WriteFile(filepath.Join(path, "foo"), []byte("foo"), 0755) + err = os.WriteFile(filepath.Join(path, "foo"), []byte("foo"), 0755) c.Assert(err, IsNil) hash, err := w.Commit("foo", &CommitOptions{Author: defaultSignature()}) c.Assert(err, IsNil) @@ -118,14 +117,14 @@ func (s *WorktreeSuite) TestPullNonFastForward(c *C) { w, err := server.Worktree() c.Assert(err, IsNil) - err = ioutil.WriteFile(filepath.Join(path, "foo"), []byte("foo"), 0755) + err = os.WriteFile(filepath.Join(path, "foo"), []byte("foo"), 0755) c.Assert(err, IsNil) _, err = w.Commit("foo", &CommitOptions{Author: defaultSignature()}) c.Assert(err, IsNil) w, err = r.Worktree() c.Assert(err, IsNil) - err = ioutil.WriteFile(filepath.Join(path, "bar"), []byte("bar"), 0755) + err = os.WriteFile(filepath.Join(path, "bar"), []byte("bar"), 0755) c.Assert(err, IsNil) _, err = w.Commit("bar", &CommitOptions{Author: defaultSignature()}) c.Assert(err, IsNil) @@ -287,7 +286,7 @@ func (s *WorktreeSuite) TestPullAlreadyUptodate(c *C) { w, err := r.Worktree() c.Assert(err, IsNil) - err = ioutil.WriteFile(filepath.Join(path, "bar"), []byte("bar"), 0755) + err = os.WriteFile(filepath.Join(path, "bar"), []byte("bar"), 0755) c.Assert(err, IsNil) _, err = w.Commit("bar", &CommitOptions{Author: defaultSignature()}) c.Assert(err, IsNil) @@ -315,7 +314,7 @@ func (s *WorktreeSuite) TestCheckout(c *C) { ch, err := fs.Open("CHANGELOG") c.Assert(err, IsNil) - content, err := ioutil.ReadAll(ch) + content, err := io.ReadAll(ch) c.Assert(err, IsNil) c.Assert(string(content), Equals, "Initial changelog\n") |