Skip to content
Snippets Groups Projects
Commit f2aba695 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

use os.ReadFile instead of ioutil.ReadFile in fileutil

parent 1eff5ba3
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@
package fileutil
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
......@@ -57,7 +56,7 @@ func Append(path, content string, doNotCreateIfDoesNotExist ...bool) error {
func MustReadFile(filename string) []byte {
filename = evalSymlink(filename)
log.WithField("filepath", filename).Trace("Found file. Reading config file ...")
file, err := ioutil.ReadFile(filename)
file, err := os.ReadFile(filename)
if err != nil {
log.WithError(err).Error("Error reading config file")
os.Exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment