aboutsummaryrefslogtreecommitdiffstats
path: root/walrss
diff options
context:
space:
mode:
authorAKP <tom@tdpain.net>2022-08-13 15:01:24 +0100
committerAKP <tom@tdpain.net>2022-08-13 15:01:24 +0100
commitc9aacf30c71246927e9acd7d26198a2e48683038 (patch)
treecd54ac5d89ec5f58e82127950b53ed7eae197774 /walrss
parent15e757aa0f228950bd46e7fd76fa655e6e408a58 (diff)
chore: replace use of deprecated `ioutil.WriteFile`
Signed-off-by: AKP <tom@tdpain.net>
Diffstat (limited to 'walrss')
-rw-r--r--walrss/internal/state/state.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/walrss/internal/state/state.go b/walrss/internal/state/state.go
index 3ea8288..76fad36 100644
--- a/walrss/internal/state/state.go
+++ b/walrss/internal/state/state.go
@@ -7,7 +7,6 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
bh "github.com/timshannon/bolthold"
- "io/ioutil"
"os"
"strings"
)
@@ -48,7 +47,7 @@ func LoadConfig() (*Config, error) {
if _, err := os.Stat(configFilename); err != nil {
if errors.Is(err, os.ErrNotExist) {
// If the file doesn't have contents, Fig will throw an EOF, despite `touch config.yaml` working fine. idk lol
- if err := ioutil.WriteFile(configFilename, []byte("{}"), 0777); err != nil {
+ if err := os.WriteFile(configFilename, []byte("{}"), 0777); err != nil {
return nil, err
}
} else {