Skip to content
Myr

Remove references to io/ioutil package

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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

authored by Austin Vazquez · committed by Christian Muehlhaeuser · parent 7ba62d4 · Browse files · 2 files+3 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Austin Vazquez <macedonv@amazon.com>

Diff stats

2 files+3 added−4 removed

  • other:+3 added−4 removed

2 files+3 added−4 removed

modified:examples/pager/main.go+1 added-2 removed
3 unmodified lines
4// component library.56import (7 "fmt"8 "io/ioutil"8 "os"9 "strings"1011 "github.com/charmbracelet/bubbles/viewport"
115 unmodified lines
127}128129func main() {130 // Load some text for our viewport132 content, err := ioutil.ReadFile("artichoke.md")131 content, err := os.ReadFile("artichoke.md")132 if err != nil {133 fmt.Println("could not load file:", err)134 os.Exit(1)135 }
12 unmodified lines
modified:examples/tui-daemon-combo/main.go+2 added-2 removed
1 unmodified line
23import (4 "flag"5 "fmt"6 "io/ioutil"6 "io"7 "log"8 "math/rand"9 "os"10 "time"
29 unmodified lines
40 // If we're in daemon mode don't render the TUI41 opts = []tea.ProgramOption{tea.WithoutRenderer()}42 } else {43 // If we're in TUI mode, discard log output44 log.SetOutput(ioutil.Discard)44 log.SetOutput(io.Discard)45 }4647 p := tea.NewProgram(newModel(), opts...)48 if _, err := p.Run(); err != nil {
91 unmodified lines