feat: replace ioutil with io and os (#1816)

This commit is contained in:
Nicholas Wiersma
2023-01-27 17:12:47 +02:00
committed by GitHub
parent 6baf7c9033
commit ab64133949
23 changed files with 76 additions and 81 deletions
+2 -3
View File
@@ -3,7 +3,6 @@ package external
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"strconv"
"strings"
@@ -88,7 +87,7 @@ func NewServer(strg storage.Backend) http.Handler {
return
}
defer infoFile.Close()
info, err := ioutil.ReadAll(infoFile)
info, err := io.ReadAll(infoFile)
if err != nil {
http.Error(w, err.Error(), 400)
return
@@ -99,7 +98,7 @@ func NewServer(strg storage.Backend) http.Handler {
return
}
defer modReader.Close()
modFile, err := ioutil.ReadAll(modReader)
modFile, err := io.ReadAll(modReader)
if err != nil {
http.Error(w, err.Error(), 400)
return