From 7152b7e59b6e30d3025cf5c6386eb2e54b95c139 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:00:12 -0700 Subject: Replace deprecated iotuil usage --- hotline/ui.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hotline/ui.go') diff --git a/hotline/ui.go b/hotline/ui.go index c005fb4..45c452c 100644 --- a/hotline/ui.go +++ b/hotline/ui.go @@ -5,7 +5,6 @@ import ( "github.com/gdamore/tcell/v2" "github.com/rivo/tview" "gopkg.in/yaml.v3" - "io/ioutil" "os" "strconv" "strings" @@ -161,7 +160,7 @@ func (ui *UI) renderSettingsForm() *tview.Flex { // TODO: handle err } // TODO: handle err - err = ioutil.WriteFile(ui.HLClient.cfgPath, out, 0666) + err = os.WriteFile(ui.HLClient.cfgPath, out, 0666) if err != nil { println(ui.HLClient.cfgPath) panic(err) @@ -236,7 +235,7 @@ func (ui *UI) renderJoinServerForm(name, server, login, password, backPage strin panic(err) } - err = ioutil.WriteFile(ui.HLClient.cfgPath, out, 0666) + err = os.WriteFile(ui.HLClient.cfgPath, out, 0666) if err != nil { panic(err) } -- cgit