mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
remove deprecated calls
This commit is contained in:
parent
c81333fefe
commit
b8900baf1a
21 changed files with 48 additions and 59 deletions
|
@ -2,7 +2,7 @@ package oscommands
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
@ -151,7 +151,7 @@ func (c *OSCommand) CreateFileWithContent(path string, content string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(path, []byte(content), 0o644); err != nil {
|
||||
if err := os.WriteFile(path, []byte(content), 0o644); err != nil {
|
||||
c.Log.Error(err)
|
||||
return utils.WrapError(err)
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ func (c *OSCommand) PipeCommands(commandStrings ...string) error {
|
|||
c.Log.Error(err)
|
||||
}
|
||||
|
||||
if b, err := ioutil.ReadAll(stderr); err == nil {
|
||||
if b, err := io.ReadAll(stderr); err == nil {
|
||||
if len(b) > 0 {
|
||||
finalErrors = append(finalErrors, string(b))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue