From e079831c31928b17449eedc306fbdca653bea219 Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Sun, 30 Oct 2022 20:42:57 -0700 Subject: [PATCH] Remove references to io/ioutil package Package io/ioutil has been marked deprecated starting in Go 1.16. Signed-off-by: Austin Vazquez --- examples/pager/main.go | 3 +-- examples/tui-daemon-combo/main.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/pager/main.go b/examples/pager/main.go index a98a9ec..f602ad7 100644 --- a/examples/pager/main.go +++ b/examples/pager/main.go @@ -5,7 +5,6 @@ package main import ( "fmt" - "io/ioutil" "os" "strings" @@ -129,7 +128,7 @@ func max(a, b int) int { func main() { // Load some text for our viewport - content, err := ioutil.ReadFile("artichoke.md") + content, err := os.ReadFile("artichoke.md") if err != nil { fmt.Println("could not load file:", err) os.Exit(1) diff --git a/examples/tui-daemon-combo/main.go b/examples/tui-daemon-combo/main.go index cbe7799..df26034 100644 --- a/examples/tui-daemon-combo/main.go +++ b/examples/tui-daemon-combo/main.go @@ -3,7 +3,7 @@ package main import ( "flag" "fmt" - "io/ioutil" + "io" "log" "math/rand" "os" @@ -41,7 +41,7 @@ func main() { opts = []tea.ProgramOption{tea.WithoutRenderer()} } else { // If we're in TUI mode, discard log output - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) } p := tea.NewProgram(newModel(), opts...)