@@ -2,7 +2,7 @@ package git_commands
22
33import (
44 "fmt"
5- "io/ioutil "
5+ "os "
66 "path/filepath"
77 "strings"
88
@@ -202,7 +202,7 @@ func (self *RebaseCommands) AmendTo(sha string) error {
202202// EditRebaseTodo sets the action at a given index in the git-rebase-todo file
203203func (self * RebaseCommands ) EditRebaseTodo (index int , action string ) error {
204204 fileName := filepath .Join (self .dotGitDir , "rebase-merge/git-rebase-todo" )
205- bytes , err := ioutil .ReadFile (fileName )
205+ bytes , err := os .ReadFile (fileName )
206206 if err != nil {
207207 return err
208208 }
@@ -217,7 +217,7 @@ func (self *RebaseCommands) EditRebaseTodo(index int, action string) error {
217217 content [contentIndex ] = action + " " + strings .Join (splitLine [1 :], " " )
218218 result := strings .Join (content , "\n " )
219219
220- return ioutil .WriteFile (fileName , []byte (result ), 0o644 )
220+ return os .WriteFile (fileName , []byte (result ), 0o644 )
221221}
222222
223223func (self * RebaseCommands ) getTodoCommitCount (content []string ) int {
@@ -234,7 +234,7 @@ func (self *RebaseCommands) getTodoCommitCount(content []string) int {
234234// MoveTodoDown moves a rebase todo item down by one position
235235func (self * RebaseCommands ) MoveTodoDown (index int ) error {
236236 fileName := filepath .Join (self .dotGitDir , "rebase-merge/git-rebase-todo" )
237- bytes , err := ioutil .ReadFile (fileName )
237+ bytes , err := os .ReadFile (fileName )
238238 if err != nil {
239239 return err
240240 }
@@ -247,7 +247,7 @@ func (self *RebaseCommands) MoveTodoDown(index int) error {
247247 rearrangedContent = append (rearrangedContent , content [contentIndex + 1 :]... )
248248 result := strings .Join (rearrangedContent , "\n " )
249249
250- return ioutil .WriteFile (fileName , []byte (result ), 0o644 )
250+ return os .WriteFile (fileName , []byte (result ), 0o644 )
251251}
252252
253253// SquashAllAboveFixupCommits squashes all fixup! commits above the given one
0 commit comments