remove deprecated ioutil

This commit is contained in:
Samuel Lorch 2023-04-02 02:55:32 +02:00
parent 8d957a53e2
commit 29819910a5

View file

@ -3,7 +3,7 @@ package config
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "os"
"nfsense.net/nfsense/internal/definitions" "nfsense.net/nfsense/internal/definitions"
) )
@ -14,7 +14,7 @@ func (m *ConfigManager) saveConfig(path string, conf *definitions.Config) error
return fmt.Errorf("Marshal Config: %w", err) return fmt.Errorf("Marshal Config: %w", err)
} }
err = ioutil.WriteFile(path, data, 0644) err = os.WriteFile(path, data, 0644)
if err != nil { if err != nil {
return fmt.Errorf("Write Config: %w", err) return fmt.Errorf("Write Config: %w", err)
} }