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,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -19,7 +19,7 @@ func main() {
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
|
||||
var data interface{}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
@@ -210,7 +209,7 @@ func main() {
|
||||
var tests []test
|
||||
|
||||
for _, filename := range os.Args[1:] {
|
||||
source, err := ioutil.ReadFile(filename)
|
||||
source, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user