diff options
Diffstat (limited to 'commands/input/input.go')
-rw-r--r-- | commands/input/input.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/input/input.go b/commands/input/input.go index 4ccfbd92..90c3cf51 100644 --- a/commands/input/input.go +++ b/commands/input/input.go @@ -8,7 +8,7 @@ import ( "bufio" "bytes" "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -72,7 +72,7 @@ func LaunchEditor(repo repository.RepoCommonStorage, fileName string) (string, e return "", fmt.Errorf("Editing finished with error: %v\n", err) } - output, err := ioutil.ReadFile(path) + output, err := os.ReadFile(path) if err != nil { return "", fmt.Errorf("Error reading edited file: %v\n", err) @@ -93,7 +93,7 @@ func FromFile(fileName string) (string, error) { } if (stat.Mode() & os.ModeCharDevice) == 0 { // There is no tty. This will allow us to read piped data instead. - output, err := ioutil.ReadAll(os.Stdin) + output, err := io.ReadAll(os.Stdin) if err != nil { return "", fmt.Errorf("Error reading from stdin: %v\n", err) } @@ -110,7 +110,7 @@ func FromFile(fileName string) (string, error) { return output.String(), nil } - output, err := ioutil.ReadFile(fileName) + output, err := os.ReadFile(fileName) if err != nil { return "", fmt.Errorf("Error reading file: %v\n", err) } |