mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-15 07:24:32 +02:00
Fix deprecated uses of ioutil
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
@@ -134,7 +133,7 @@ var initCmd = &cobra.Command{
|
||||
_, err = os.Stat(indexFilePath)
|
||||
if os.IsNotExist(err) {
|
||||
// Create file
|
||||
err = ioutil.WriteFile(indexFilePath, []byte{}, 0644)
|
||||
err = os.WriteFile(indexFilePath, []byte{}, 0644)
|
||||
if err != nil {
|
||||
fmt.Printf("Error creating index file: %s\n", err)
|
||||
os.Exit(1)
|
||||
|
Reference in New Issue
Block a user