Skip to content

Commit

Permalink
Remove references to io/ioutil package
Browse files Browse the repository at this point in the history
Package io/ioutil has been marked deprecated starting in Go 1.16.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
  • Loading branch information
austinvazquez authored and muesli committed Nov 10, 2022
1 parent 7ba62d4 commit e079831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/pager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package main

import (
"fmt"
"io/ioutil"
"os"
"strings"

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions examples/tui-daemon-combo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"math/rand"
"os"
Expand Down Expand Up @@ -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...)
Expand Down

0 comments on commit e079831

Please sign in to comment.