Switch from deprecated ioutil
This commit is contained in:
parent
95cb24ac04
commit
ded4e129a1
@ -2,7 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"io/ioutil"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.iamthefij.com/iamthefij/slog"
|
"git.iamthefij.com/iamthefij/slog"
|
||||||
@ -170,7 +170,7 @@ func (config *Config) Init() (err error) {
|
|||||||
|
|
||||||
// LoadConfig will read config from the given path and parse it
|
// LoadConfig will read config from the given path and parse it
|
||||||
func LoadConfig(filePath string) (config Config, err error) {
|
func LoadConfig(filePath string) (config Config, err error) {
|
||||||
data, err := ioutil.ReadFile(filePath)
|
data, err := os.ReadFile(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user