Fix deprecated uses of ioutil

This commit is contained in:
comp500
2023-01-20 18:43:46 +00:00
parent 79d3ed3957
commit 672d22d0dd
6 changed files with 9 additions and 15 deletions

View File

@@ -3,7 +3,6 @@ package packinterop
import (
"bufio"
"io"
"io/ioutil"
"os"
"path/filepath"
)
@@ -68,7 +67,7 @@ func (s diskPackSource) GetFileList() ([]ImportPackFile, error) {
}
func (s diskPackSource) GetPackFile() ImportPackFile {
rc := ioutil.NopCloser(s.MetaSource)
rc := io.NopCloser(s.MetaSource)
return readerFile{s.MetaName, &rc}
}

View File

@@ -6,7 +6,6 @@ import (
"fmt"
"github.com/packwiz/packwiz/core"
"io"
"io/ioutil"
"os"
)
@@ -20,7 +19,7 @@ func ReadMetadata(s ImportPackSource) ImportPackMetadata {
}
// Read the whole file (as we are going to parse it multiple times)
fileData, err := ioutil.ReadAll(rdr)
fileData, err := io.ReadAll(rdr)
if err != nil {
fmt.Printf("Error reading file: %s\n", err)
os.Exit(1)