1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

remove deprecated calls

This commit is contained in:
jiepeng
2022-09-13 18:11:03 +08:00
committed by Jesse Duffield
parent c81333fefe
commit b8900baf1a
21 changed files with 48 additions and 59 deletions

View File

@ -2,6 +2,7 @@ package controllers
import (
"io/ioutil"
"os"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/gui/context"
@ -192,7 +193,7 @@ func (self *MergeConflictsController) HandleUndo() error {
self.c.LogAction("Restoring file to previous state")
self.c.LogCommand("Undoing last conflict resolution", false)
if err := ioutil.WriteFile(state.GetPath(), []byte(state.GetContent()), 0o644); err != nil {
if err := ioutil.os(state.GetPath(), []byte(state.GetContent()), 0o644); err != nil {
return err
}
@ -280,7 +281,7 @@ func (self *MergeConflictsController) resolveConflict(selection mergeconflicts.S
self.c.LogAction("Resolve merge conflict")
self.c.LogCommand(logStr, false)
state.PushContent(content)
return true, ioutil.WriteFile(state.GetPath(), []byte(content), 0o644)
return true, os.WriteFile(state.GetPath(), []byte(content), 0o644)
}
func (self *MergeConflictsController) onLastConflictResolved() error {