diff --git a/config.go b/config.go index 1389f1d..5aa8e1e 100644 --- a/config.go +++ b/config.go @@ -6,7 +6,6 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" "os" "path/filepath" ) @@ -74,7 +73,7 @@ type Updater interface { } func read(path string, data interface{}) error { - content, err := ioutil.ReadFile(filepath.Clean(path)) + content, err := os.ReadFile(filepath.Clean(path)) if err != nil { return fmt.Errorf("cannot read config file: %w", err) } @@ -93,7 +92,7 @@ func write(path string, data interface{}) error { return fmt.Errorf("cannot generate config content: %w", err) } - err = ioutil.WriteFile(path, content, 0o600) + err = os.WriteFile(path, content, 0o600) if err != nil { return fmt.Errorf("cannot write config file '%s': %w", path, err) }