From c9aacf30c71246927e9acd7d26198a2e48683038 Mon Sep 17 00:00:00 2001 From: AKP Date: Sat, 13 Aug 2022 15:01:24 +0100 Subject: chore: replace use of deprecated `ioutil.WriteFile` Signed-off-by: AKP --- walrss/internal/state/state.go | 3 +-- 1 file changed, 1 insertion(+), 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 { -- cgit v1.2.3-70-g09d2