Remove references to io/ioutil package

Package io/ioutil has been marked deprecated starting in Go 1.16.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
This commit is contained in:
Austin Vazquez 2022-10-30 20:42:57 -07:00 committed by Christian Muehlhaeuser
parent 7ba62d4987
commit e079831c31
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,6 @@ package main
import ( import (
"fmt" "fmt"
"io/ioutil"
"os" "os"
"strings" "strings"
@ -129,7 +128,7 @@ func max(a, b int) int {
func main() { func main() {
// Load some text for our viewport // Load some text for our viewport
content, err := ioutil.ReadFile("artichoke.md") content, err := os.ReadFile("artichoke.md")
if err != nil { if err != nil {
fmt.Println("could not load file:", err) fmt.Println("could not load file:", err)
os.Exit(1) os.Exit(1)

View File

@ -3,7 +3,7 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"io/ioutil" "io"
"log" "log"
"math/rand" "math/rand"
"os" "os"
@ -41,7 +41,7 @@ func main() {
opts = []tea.ProgramOption{tea.WithoutRenderer()} opts = []tea.ProgramOption{tea.WithoutRenderer()}
} else { } else {
// If we're in TUI mode, discard log output // If we're in TUI mode, discard log output
log.SetOutput(ioutil.Discard) log.SetOutput(io.Discard)
} }
p := tea.NewProgram(newModel(), opts...) p := tea.NewProgram(newModel(), opts...)