mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
ioutil: Remove deprecated functions where possible
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"bufio"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
@@ -91,7 +90,7 @@ func CleanConfig() {
|
||||
|
||||
// detect incorrectly formatted buffer/ files
|
||||
buffersPath := filepath.Join(config.ConfigDir, "buffers")
|
||||
files, err := ioutil.ReadDir(buffersPath)
|
||||
files, err := os.ReadDir(buffersPath)
|
||||
if err == nil {
|
||||
var badFiles []string
|
||||
var buffer buffer.SerializedBuffer
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -209,7 +208,7 @@ func LoadInput(args []string) []*buffer.Buffer {
|
||||
// Option 2
|
||||
// The input is not a terminal, so something is being piped in
|
||||
// and we should read from stdin
|
||||
input, err = ioutil.ReadAll(os.Stdin)
|
||||
input, err = io.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
screen.TermMessage("Error reading from stdin: ", err)
|
||||
input = []byte{}
|
||||
|
||||
Reference in New Issue
Block a user